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.

Copyright information for ESV