GYM 101350 H. Mirrored String I

Topic description

The gorillas have recently discovered that the image on the surface of the water is actually a reflection of themselves. So, the next thing for them to discover is mirrored strings.

A mirrored string is a palindrome string that will not change if you view it on a mirror.

Examples of mirrored strings are “MOM”, “IOI” or “HUH”. Therefore, mirrored strings must contain only mirrored letters {A, H, I, M, O, T, U, V, W, X, Y} and be a palindrome.

e.g. IWWI, MHHM are mirrored strings, while IWIW, TFC are not.

A palindrome is a string that is read the same forwards and backwards.

Can you tell if string S is a mirrored string?

enter

The first line of input is T – the number of test cases.

Each test case contains a non-empty string S of maximum length 1000. The string contains only uppercase English letters.

output

For each test case, output “yes” (without quotes) if the string S is a mirrored string, otherwise output “no”.

Sample

inputCopy
3
IOI
ARABELLA
RACECAR
outputCopy
yes
no
no

meaning of the title

simple string. .

AC code

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821770&siteId=291194637