Alice and Bob decided to eat some fruit. In the kitchen they found a large bag of oranges and apples. Alice immediately took an orange for herself, Bob took an apple. To make the process of sharing the remaining fruit more fun, the friends decided to play a game. They put multiple cards and on each one they wrote a letter, either 'A', or the letter 'B'. Then they began to remove the cards one by one from left to right, every time they removed a card with the letter 'A', Alice gave Bob all the fruits she had at that moment and took out of the bag as many apples and as many oranges as she had before. Thus the number of oranges and apples Alice had, did not change. If the card had written letter 'B', then Bob did the same, that is, he gave Alice all the fruit that he had, and took from the bag the same set of fruit. After the last card way removed, all the fruit in the bag were over.

You know how many oranges and apples was in the bag at first. Your task is to find any sequence of cards that Alice and Bob could have played with.
The first line of the input contains two integers, *x*, *y* (1 ≤ *x*, *y* ≤ 10<sup class="upper-index">18</sup>, *xy* &gt; 1) — the number of oranges and apples that were initially in the bag.
a,b=map(int,input().split())
s=''
boo=True
while True:
    if a>b:
        mod=(a-1)//b
        s+=str(mod)+'A'
        a-=mod*b
        continue
    elif b>a:
        mod=(b-1)//a
        s+=str(mod)+'B'
        b-=mod*a
        continue
    else:
        if a==1:
            break
        else:
            boo=False
            break
if boo:
    print(s)
else:
    print('Impossible')