On the 70th anniversary of HUST (Hualishu University of Science and Technology), the grandstand in the playground near QinYuan is renewed!
Walk Alone loves the new grandstand. He finds that the new grandstand is a matrix of $$$n\times m$$$ seats with $$$n$$$ rows and $$$m$$$ columns, and each seat is colored either blue, red or white. The red seats in the grandstand form the shape of 'HUST' together.
What is more, Walk Alone finds that the shape of the four letters should satisfy the following rules:
For better understanding, it is recommended to see the illustration below ($$$x,y,z$$$ and $$$d$$$ are arbitrary positive integers):
![]() | ![]() |
Now Walk Alone gives you a part of the grandstand, in which some seats are colored red. You need recognize whether it belongs to one of 'H', 'U', 'S', 'T', or Walk Alone is cheating (it does not belong to any of the four letters).
The input contains multiple test cases.
The first line of the input contains an integer $$$T\ (1\le T\le 10)$$$, the number of test cases.
For each test case, the first line contains two integers $$$n$$$ and $$$m\ (1\le n,m\le 3000)$$$, indicating the size of grandstand.
Each of the next $$$n$$$ lines is a string of length $$$m$$$ consisting only of '.' and 'x'. The $$$j$$$-th character in the $$$i$$$-th line is 'x' if and only if the seat located at the $$$j$$$-th column and the $$$i$$$-th row is red.
For each test case, output one of 'H', 'U', 'S' or 'T' as the answer, or 'OOPS!' (without quotes) if none of them are correct.
46 5.xxx..x....xxx....x....x..xxx.5 5xx.xxxx.xxxxxxxxxxxxxx.xx5 5xx..xxx..xxxxxxxxxxxxx..x2 3xxx..x
S H OOPS! OOPS!
| Name |
|---|


