In a tournament team A won 7 less games than Team B, and Team B won exactly three times as many games as team C. If If Team C won g games, how many games did Team A win?