#C1637. Determine the Game Winner

    ID: 44864 Type: Default 1000ms 256MiB

Determine the Game Winner

Determine the Game Winner

In this problem, two players, Anna and Bob, engage in a series of games. Anna always starts first, and the outcome of each game is determined by the length of a given string. Specifically, if the number of characters in the string is odd, then Anna wins; otherwise, Bob wins. Your task is to determine the winner for each game.

The scoring rule can be mathematically represented as follows: [ \text{winner}(s) = \begin{cases} \text{Anna} & \text{if } |s| \equiv 1 \pmod{2},\ \text{Bob} & \text{if } |s| \equiv 0 \pmod{2}. \end{cases} ] where (|s|) denotes the length of the string.

inputFormat

The input is provided via standard input (stdin) and consists of multiple lines:

  1. The first line contains an integer T (1 ≤ T ≤ 1000), representing the number of test cases.
  2. The next T lines each contain a non-empty string representing a game.

Each game string's length will not exceed 1000 characters.

outputFormat

For each test case, print the winner's name on a new line using standard output (stdout). Print "Anna" if the string length is odd, and "Bob" if it is even.## sample

3
abc
a
xy
Anna

Anna Bob

</p>