{"raw_statement":[{"iden":"statement","content":"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.\n\nA mirrored string is a palindrome string that will not change if you view it on a mirror. \n\nExamples 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.\n\ne.g. IWWI, MHHM are mirrored strings, while IWIW, TFC are not.\n\nA palindrome is a string that is read the same forwards and backwards.\n\nCan you tell if string S is a mirrored string?\n\nThe first line of input is T – the number of test cases.\n\nEach test case contains a non-empty string S of maximum length 1000. The string contains only uppercase English letters.\n\nFor each test case, output \"yes\" (without quotes) if the string S is a mirrored string, otherwise output \"no\".\n\n"},{"iden":"input","content":"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."},{"iden":"output","content":"For each test case, output \"yes\" (without quotes) if the string S is a mirrored string, otherwise output \"no\"."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nLet $ S_k \\in \\Sigma^* $ be the input string for test case $ k \\in \\{1, \\dots, T\\} $, where $ \\Sigma = \\{A, B, \\dots, Z\\} $.  \nLet $ M = \\{A, H, I, M, O, T, U, V, W, X, Y\\} $ be the set of mirrored letters.\n\n**Constraints**  \n1. $ 1 \\leq T \\leq \\text{unspecified} $  \n2. For each $ k $:  \n   - $ 1 \\leq |S_k| \\leq 1000 $  \n   - $ S_k \\in \\Sigma^* $, consisting only of uppercase English letters.\n\n**Objective**  \nFor each test case $ k $, determine whether:  \n1. $ S_k $ is a palindrome: $ S_k[i] = S_k[|S_k| + 1 - i] $ for all $ i \\in \\{1, \\dots, \\lfloor |S_k|/2 \\rfloor\\} $, and  \n2. Every character in $ S_k $ belongs to $ M $.  \n\nOutput \"yes\" if both conditions hold; otherwise, output \"no\".","simple_statement":"Check if a string is a mirrored string: it must be a palindrome and contain only letters from {A, H, I, M, O, T, U, V, W, X, Y}. Print \"yes\" if it is, \"no\" otherwise.","has_page_source":false}