Pikachu loves battling with other Pokemon. This time he has a team of Meowstic to fight, of which has strength . He wants to fight with all of them times. Team Meowstic came to know about this and now they have devised a strategy to battle against the mighty Pikachu.
All the Meowstic stand in a straight line numbered from to . Before every round of battle, they simultaneously use a move, called Helping Hand. It changes the attacking power of Team Meowstic as follows:
For example, if the current attacking powers are , after using the Helping Hand, the powers change to , or .
Help Pikachu by finding the attacking powers of all Meowstic when he fights each of them for the last time, that is, for the round.
Note that, the influence of Helping Hand remains forever, and attacking powers DO NOT revert back after any round.
Constraints:
Input format:
Output format:
Battle 1:
Battle 2:
Battle 3: