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

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
for _ in range(int(input())):
	n = int(input())
	if n < 3:
		print('B')
	elif 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')


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


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


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


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


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


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


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