Олимпиадный тренинг

Задача 39056. economic literacy


Many banks, when paying for purchases with their bank cards, offer a refund system for part of the money spent, called cashback .

Alena's mother has three similar cards with different conditions for returning part of the amount spent. The bank card RR receives 5 rubles from each full 100 rubles of the cost of one purchase. For example, 5 rubles is returned for a purchase worth 100 rubles and 199 rubles. Bank BB returns 2 rubles from every 50 rubles of purchase, and for a purchase worth 199 rubles it will return 6 rubles. And the MM bank returns 3% of the total cost of any purchase (note that if the price is an integer number of rubles, 3% will always be an integer number of kopecks), so 5 rubles will be returned for a purchase of 199 rubles. 97 kopecks

Alena loves to go shopping with her mother. Mom suggested that Alena decide which purchase to pay with which card so that the refund amount is the maximum possible. Consider that payment for any purchase is possible with any card. If any two or all three cards give the best return amount accurate to kopecks, then Alyona chooses the one of the cards that she likes best in terms of design. Most of all, Alena likes the MM bank card, then comes the BB bank card, and Alena likes the RR bank card the least.


Input

Enter a single integer ( 1 <= S <= 10 000 ) — purchase price in rubles.


Output

Print the name of the bank RR BB or MM depending on which bank card is more profitable to pay this purchase. And if the return amount is equal - the name of the bank specified in the task condition.

 

Note

In the first example, only the bank MM  will refund part of the purchase amount. The second example is analyzed in the problem statement.

 
Examples
# Input Output
1 10 MM
2 199 BB
3 101 RR