A and B decide to a play a game.They take a long strip of paper and divide it into N cells. They decide that A would start the game and B would pick up some cells on the strip and write 'B' on them.On the rest of the cells 'A' is written.
Now each player in his turn picks up any number(atleast 1) of CONTIGUOUS CELLS and puts a peg on each of them.The game ends when only 1 cell remains.Now if the remaining cell has 'B' wriiten on it ,he wins else A does.
Now B wants u to figure out that for the given strip of cells that he has prepared who will win the game if both play optimally.
The input file consists of a number of test cases.For each test case a string is given on a line.Take input till EOF.
For each test case print "A" if A wins otherwise print "B".
Number of test cases<=200
Problem Setter:Shradha Chhaparia
Problem Tester: Dhruva Bhaswar