Devarim 23:23

23 (3) A mamzer shall not enter into the Kahal Hashem; even to his tenth generation shall he not enter into the Kahal Hashem.