#C7313. Determine the Winner in the Stick Game
Determine the Winner in the Stick Game
Determine the Winner in the Stick Game
You are given n sticks and a list of their lengths. Two players, Vanya and his Brother, play a game where they take turns removing one stick per move. Vanya always goes first. Both players play optimally. The winner is the one who gets to remove the last stick.
Your task is to determine the winner given the number of sticks and the list of stick lengths.
Note: The lengths of the sticks do not influence the outcome; the result depends solely on the parity of n. If n is odd, Vanya will always win because he makes the first and the last move. Otherwise, his Brother wins.
The decision can be based on the following simple strategy using modular arithmetic:
\( \text{Winner} = \begin{cases} \text{Vanya} & \text{if } n \mod 2 = 1, \\ \text{Brother} & \text{if } n \mod 2 = 0. \end{cases} \)
inputFormat
The first line of input contains a single integer n representing the number of sticks.
The second line contains n space-separated integers representing the lengths of the sticks.
All inputs are provided via standard input (stdin).
outputFormat
Output a single line containing either "Vanya" if Vanya wins or "Brother" if his brother wins.
The output should be written to standard output (stdout).
## sample3
1 2 3
Vanya