In the American TV series Survivor, there was once a game in which the participants were divided into two teams,say A and B. The team which removed the last flag was declared the winner.There were 25 flags with the teams allowed to remove 1,2 or 3 flags at each try with A starting first. Also, if one team has no chances of winning, it always chooses the maximum number of flags.
If optimum play is assumed, which team wins? What if there were $n$ flags?
Bonus question: What will happen if we increase the number of teams to 3? How will the winning chances of A and B be affected?