Mark and Leti love to play with Bakugan balls. These balls are small plastic spheres, each holding a tiny monster toy inside. When dropped on the ground a Bakugan ball pops open with an incredible sound, releasing a fearsome Bakugan monster.
There are 10 different monsters. Mark and Leti ranked them by ugliness and assigned each monster a distinct integer from 1 to 10.
A game consists of $R$ rounds. In each round:
The 30-point bonus is awarded at most once during the whole game, to whichever player reaches three identical consecutive monsters earliest.
The winner is the player who accumulates more points. Determine the winner of each game.
The input contains several test cases. Each test case is described using three lines:
The input ends with a line containing a single 0, which must not be processed.
For each test case, print a single line containing one character that represents the result of the game:
M if Mark wins,L if Leti wins,T if the game is a tie.