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

Starter code:

Solutions:

for _ in range(int(input())):
    n=int(input())
    if(n<3):
        print("B")
    else:
        if(n==3):
            print("A")
        elif(n%2):
            print("B")
        else:
            print("B")










for _ in range(int(input())):
    n=int(input())
    if n%2==0:
        print('B')
    else:    
        a=n-2
        if a==1 or a%2==0:
            print('A')
        else:
            print('B')


for _ in range(int(input())):
    n=int(input())
    if(n<3):
        print("B")
    else:
        if(n==3):
            print("A")
        elif(n%2):
            print("B")
        else:
            print("B")










t = int(input())

while t>0:
	n = int(input())
	
	if n == 3:
		print("A")
	else:
		print("B")
		
	t = t-1

# cook your dish here
for i in range(int(input())):
    a =int(input())
    if a%2==0:
        print('B')
    else:
        if a==1:
            print('B')
        elif a==3:
            print('A')
        else:
            print('B')


# 1 —> B will lose (A takes 1)
# 2 —> B will lose (A takes 2)
# 3 —> A will lose (A takes 1/2, B takes 2/1)
# 4 —> B will lose (A takes 1, B takes 1/2, A takes 2/1)
# 5 —>  B will lose (A takes 2, B takes 1/2, A takes 2/1)
# 6 —>  B will lose (A takes 3, B has turn and 3 marbles, see above)
# 7 —> B will lose (A takes 4, B has turn and 3 marbles, see above)
# 8 —> B will lose [ - A takes 1, B has turn and 7 marbles, see above 
# 			 [ - A takes 2, B has turn and 6 marbles, see above 
# 			 [ - A takes 4, B has turn and 4 marbles, see above 
# 			 [ - A takes 6, B has turn and 2 marbles, see above 
# 			 [ - A takes 8
# Even —> B will lose
# Odd —> B will lose (unless 3)
for _ in range(int(input())):
    n = int(input())
    print("A") if(n == 3) else print("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
t=int(input())
while(t>0):
    n=int(input())
    if n==3:
        print('A')
    else:
        print('B')
    t=t-1

t = int(input())
for i in range(t):
    n = int(input())
    if n == 1 :
        print("B")
    elif n%2==0:
        print("B")
    elif  n==3:
        print("A")
    elif (n-3)%2==0:
        print("B")
    else:
        print("A")

n=int(input())
for i in range(n):
    p=int(input())
    turn=1
    while p>0:
        if p==1:
            if turn%2==0:
                print("A")
                break
            else:
                print("B")
                break
        elif p==3:
            p=p-1
            turn=turn+1
        elif p%2==0:
            if turn%2==0:
                print("A")
                break
            else:
                print("B")
                break
        else:
            p=3
            turn=turn+1

# cook your dish here
t=int(input())

for _ in range(t):
    n=int(input())
    if n==1 or n==2:
        print("B")
        continue
    if n==3:
        print("A")
        continue
    
    if n > 3:
        if n-3 > 0:
            print("B")
        else:
            print("A")

# cook your dish here
for i in range(int(input())):
    n=int(input())
    if(n==3):
        print("A")
    else:
        print("B")

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

for _ in range(int(input())):
    n=int(input())
    if n%2==0:
        print("B")
    else:
        if n==1:
            print("B")
        elif n==3:
            print("A")
        else:
            print("B")

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


for _ in range(int(input())): print('A' if int(input())==3 else 'B')

t = int(input())

for _ in range(t):

	n = int(input())

	if n == 3:
		print('A')
	else:
		print('B')

# cook your dish here
t=int(input())
for i in range(t):
    n=int(input())
    if n%2==0:
        print("B")
    elif n==1:
        print("B")
    elif n==3:
        print("A")
    else:
        print("B")
        


try:
    t=int(input())
    for _ in range(t):
        n=int(input())
        if(n==3):
            print("A")
        else:
            print("B")
except EOFError:
    pass

# cook your dish here
t=int(input())
for _ in range(t):
    n=int(input())
    if n==3:
        print('A')
    else:
        print('B')

for _ in range(int(input())):
    n = int(input())

    if n == 3:
        print('A')

    else:
        print('B')