Anna and Bruno are gamble masters. They will play a game with D-taro who is the dealer of the game.
In this game, Anna and Bruno stay in different rooms. They can communicate with each other using a broken device only. D-taro gives an integer to Anna. For Anna and Bruno, the purpose of this game is to send the given integer from Anna to Bruno using the device.
When the game starts, in the beginning, Anna declares an integer m between 1 and 2,000, inclusive. Then they play Q rounds. The round i (1≤i≤Q) is performed as follows.
Write programs which implements the strategies of Anna and Bruno so that theory win for all the Q rounds.