#!/usr/bin/env python3
import re
T = int(input())
for _ in range(T):
    N = int(input())
    S = input()
    print("Yes" if re.fullmatch(r"(mohu)+", S) else "No")

dbed4cc35824c8346f72c4c1c64544dd0aef7f45
<mask token>

<mask token>
for _ in range(T):
    N = int(input())
    S = input()
    print('Yes' if re.fullmatch('(mohu)+', S) else 'No')

<mask token>
T = int(input())
for _ in range(T):
    N = int(input())
    S = input()
    print('Yes' if re.fullmatch('(mohu)+', S) else 'No')

import re
T = int(input())
for _ in range(T):
    N = int(input())
    S = input()
    print('Yes' if re.fullmatch('(mohu)+', S) else 'No')

#!/usr/bin/env python3
import re
T = int(input())
for _ in range(T):
    N = int(input())
    S = input()
    print("Yes" if re.fullmatch(r"(mohu)+", S) else "No")
