{"problem":{"name":"H. Mirrored String I","description":{"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. A mirrored string","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10135H"},"statements":[{"statement_type":"Markdown","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## Input\n\nThe 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.\n\n## Output\n\nFor each test case, output \"yes\" (without quotes) if the string S is a mirrored string, otherwise output \"no\".\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**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\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10135H","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}