Afternoon Tea

No attempts yetTime limit3sMemory limit32 MB

Problem

While visiting the Bytic Islands, Byteasar came to love the national drink of the Byteans: tea with milk. It is always prepared in exactly the same way.

First, the teacup is filled with tea and milk mixed half and half (one half tea, one half milk). Then a ceremonial word of length nn, made up only of the letters H and M, is chosen. Now, for i=1,2,,ni = 1, 2, \ldots, n in order, the following action is performed:

  • If the ii-th letter is H, drink exactly half of the cup, then top the cup back up with tea until it is full and stir.
  • If the ii-th letter is M, drink exactly half of the cup, then top the cup back up with milk until it is full and stir.

After the action for the last letter is finished, whatever remains in the cup is thrown away.

Each time Byteasar performs this ceremony, he wonders which ingredient he has drunk more of in total: tea or milk. Help him answer this question.

Input

The first line contains an integer nn (1n1000001 \le n \le 100\,000).

The second line contains the ceremonial word: a string of exactly nn characters, each of which is either H or M.

Output

Print a single line:

  • H if Byteasar drank strictly more tea than milk
  • M if he drank strictly more milk than tea
  • HM if he drank exactly the same amount of tea and milk

Hint

For the word HMHHM, Byteasar drinks 1+37641 + \frac{37}{64} cups of tea and 5964\frac{59}{64} cups of milk in total. Since he drank more tea, the answer is H.