Exodus 20:5-6

5 aYou shall not bow down to them or serve them, for I the Lord your God am ba jealous God, cvisiting the iniquity of the fathers on the children to the third and the fourth generation of those who hate me, 6but showing steadfast love to thousands
Or  to the thousandth generation
of those who love me and keep my commandments.

Deuteronomy 23:2-3

2 e“No one born of a forbidden union may enter the assembly of the Lord. Even to the tenth generation, none of his descendants may enter the assembly of the Lord.

3 fNo Ammonite or Moabite may enter the assembly of the Lord. Even to the tenth generation, none of them may enter the assembly of the Lord forever,
Copyright information for ESV