Chef has many friends, but his best friend is Hemant. They both love to watch anime.
In fact, their weekends are meant for that only. Also, Hemant is highly into games, of which Chef is unaware. Hemant once gave a game to Chef and asked him to determine the winner of the game. Since the Chef is busy, and you are also his friend, he asked you to help him.
The Game is played between two players, $A$ and $B$. There are $N$ marbles. $A$ and $B$ plays alternately, and $A$ goes first. Each player can choose $1$ marble or $even$ number of marbles in his turn. The player who is not able to choose any marbles loses the game.
-----Input:-----
- The first line consists of a single integer $T$ denoting the number of test cases.
- The Second line contains an integers $N$, denoting the number of marbles.
-----Output:-----
For each test case, print the name of the player who loses the game.
-----Constraints-----
- $1 \leq T \leq 10^5$
- $1 \leq N \leq 10^9$
-----Sample Input:-----
3
1 
3
7 
-----Sample Output:-----
B
A
B
# cook your dish here
for _ in range(int(input())):
     n=int(input())
     if(n==1 or n%2==0):
          print('B')
          continue
     elif(n==3):
          print('A')
          continue
     else:
          if((n-3)%2==0):
               print('B')
          else:
               print('A')
          

# cook your dish here
for _ in range(int(input())):
     n=int(input())
     if(n==1 or n%2==0):
          print('B')
          continue
     elif(n==3):
          print('A')
          continue
     else:
          if((n-3)%2==0):
               print('B')
          else:
               print('A')
          
