시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB57403367.347%

문제

Two mad (and evil) scientists, Professor Zoom and Doctor Horrible, have just obtained $n$ atoms of a very rare element, which they want to share between themselves. They have decided to play the following game:

First, Professor divides the atoms into two non-empty groups. Next, Doctor takes one group and uses it for his evil purposes, and splits the other into two non-empty parts. Then, Professor takes one of the parts, and divides the other one again into two, returning it to Doctor. The game goes on -- with every turn, a scientist taking one of the parts, and splitting the other -- until one of the players is forced to split a single atom. This results in an explosion, and the unlucky splitter loses the game (probably with his life).

Knowing the number of atoms $n$ determine which one of the villains survives the game.

입력

The first line of input contains the number of test cases $z$ ($1 \leq z \leq 50$). The descriptions of the test cases follow.

Every test case consists of one integer $n$ ($1 \leq n \leq 1\,000\,000$) -- the initial number of atoms.

출력

For each test case output a line containing a single character: 'A' if Professor wins the game, 'B' if Doctor wins.

예제 입력 1

2
2
17

예제 출력 1

A
B