#K41237. Game Sequence Generation Challenge

    ID: 26821 Type: Default 1000ms 256MiB

Game Sequence Generation Challenge

Game Sequence Generation Challenge

You are given a child's age n. Based on the child's age, you are required to generate a sequence of games. For each index i (0-indexed), if \( (i + (n \mod 2)) \mod 2 = 0 \) then the game is Game B; otherwise, it is Game A. The resulting sequence is constructed by concatenating the games with the string ' then '.

For example, when n = 3:

Index 0: (0 + (3 mod 2)) mod 2 = (0+1) mod 2 = 1 → Game A
Index 1: (1 + (3 mod 2)) mod 2 = (1+1) mod 2 = 0 → Game B
Index 2: (2 + (3 mod 2)) mod 2 = (2+1) mod 2 = 1 → Game A

The complete sequence is: "Game A then Game B then Game A".

inputFormat

The input consists of a single integer n (1 ≤ n ≤ 1000) on standard input representing the child's age.

outputFormat

Output a single line which is the sequence of games generated by the described rule. The games in the output should be separated by ' then '.

## sample
3
Game A then Game B then Game A