My goal is to make a game achievement system, where you add players (which have a name, integer id, games they play), games (which have names, integer ids, list of achievements) and achievements (which have names, integer ids, and the game id that that achievement belongs to).

I am not asking for any code, I am asking how this program would ideally be structured. At a first glance, I would simply have a list of players, each player class contains games they play, each game class contains achievements. But the problem is the player itself must have the achievement, and each player's games they play must reference to the same game, not individual copies of the same game for each player.

What is the best way to structure a program such as this?