No Ammonite or Moabite: The Ammonites and Moabites were descendants of Lot (see study notes on 2:9, 19). Their origin came from an unlawful family relationship.
Later, these nations refused to let Israel pass through their land during the wilderness journey (23:4).
The phrase even to the tenth generation does not mean only ten literal generations. It refers to a very long or indefinite period of time.