Please cite the Constitutional refeerence that says they can't do that.
Google "Bill of Attainders" and review recent SCOTUS decisions.