Player A and Player B play a game using a fair coin. Player A selects a sequence A consisting of heads ('H') and tails ('T') of length L = 3. Player B then selects a different sequence B of the same length L, also consisting of 'H' and 'T'.
A fair coin is then tossed repeatedly, generating a sequence of 'H' and 'T'. The game ends when either sequence A or sequence B appears as a contiguous substring of the generated coin tosses. The player whose sequence appears first wins the game.
Given Player A's sequence A, find the sequence B that Player B should choose to maximize their probability of winning. If there are multiple sequences that yield the same maximum winning probability, print the lexicographically smallest one.
Input
The only line of the input contains a single string A (|A| = 3), consisting only of characters 'H' and 'T' — the sequence chosen by Player A.
Output
Print a single string of length |A|, consisting only of characters 'H' and 'T' — the sequence Player B should choose to maximize their winning chances.
Examples
| standard input | standard output |
|---|
| HHH
| THH
|