시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB199853.333%

문제

Two players, Anda and Kamu, want to play a game. Initially, there is an integer $N$ that consists of only non-zero digits. Anda and Kamu will take turns alternatingly starting with Anda.

During one turn, the player of that turn must do the following procedure: First, choose three consecutive digits in $N$ such that if the digits are considered as a three-digit integer, it must be divisible by $3$. Then, erase the middle digit of the chosen digits and concatenate the rest, so the number of digits in $N$ decreases by one.

If there is no valid move for the player of that turn, then the player loses. Assuming both players are playing optimally, determine the winner of the game.

입력

This problem is a multi-case problem. The first line consists of an integer $T$ ($1 ≤ T ≤ 100$) which represents the number of test cases.

Each test case consists of an integer $N$ ($1 ≤ N < 10^{100\, 000}$) in a single line. The integer $N$ consists of only non-zero digits.

The sum of the number of digits of $N$ across all test cases does not exceed $100\, 000$.

출력

For each test case, output a single string in a single line representing the winner of the game if both players play optimally. If Anda, the first player, wins the game, output Anda. Otherwise, output Kamu.

예제 입력 1

5
19823
2651265
9
73
123

예제 출력 1

Anda
Kamu
Kamu
Kamu
Anda

For the first test case, during the first turn, the only move Anda can perform is to choose the first digit to the third digit. After this move, the integer becomes $1823$, which has no valid moves for Kamu.