{"raw_statement":[{"iden":"statement","content":"Have you ever heard about the universal string? This is the largest string in the world, and it is the mother of all strings that will ever exist in any programming language!\n\nThe universal string is an infinite string built by repeating the string \"_abcdefghijklmnopqrstuvwxyz_\" infinitely. So, the universal string will look like this: \n\nYou are given a string $p$ and your task is to determine if $p$ is a substring of the universal string. Can you?\n\nA _substring_ of $s$ is a non-empty string $x$ = $s$[$l$$\\\\dots$ $r$] = $s_l$$s_{l + 1}$$\\\\dots$ $s_r$ (1 $<=$ $l$ $<=$ $r$ $<=$ |$s$|). For example, \"_code_\" and \"_force_\" are substring of \"_codeforces_\", while \"_coders_\" is not.\n\nThe first line contains an integer $T$ ($1 <= T <= 10^3$) specifying the number of test cases.\n\nEach test consists of a single line containing a non-empty string $p$ of length no more $10^3$ and consisting only of lowercase English letters. \n\nFor each test case, print \"_YES_\" (without quotes) if the given string is a substring of the universal string. Otherwise, print \"_NO_\" (without quotes).\n\n"},{"iden":"input","content":"The first line contains an integer $T$ ($1 <= T <= 10^3$) specifying the number of test cases.Each test consists of a single line containing a non-empty string $p$ of length no more $10^3$ and consisting only of lowercase English letters. "},{"iden":"output","content":"For each test case, print \"_YES_\" (without quotes) if the given string is a substring of the universal string. Otherwise, print \"_NO_\" (without quotes)."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ U = (\\texttt{abcdefghijklmnopqrstuvwxyz})^\\infty $ be the infinite periodic string formed by repeating the alphabet $ \\texttt{\"abcdefghijklmnopqrstuvwxyz\"} $ indefinitely.  \n\nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ p_k $ be a non-empty string of length at most $ 10^3 $, consisting only of lowercase English letters.  \n\n**Constraints**  \n1. $ 1 \\le T \\le 10^3 $  \n2. For each $ k $, $ 1 \\le |p_k| \\le 10^3 $ and $ p_k \\in \\{\\texttt{a}, \\dots, \\texttt{z}\\}^* $  \n\n**Objective**  \nFor each $ k \\in \\{1, \\dots, T\\} $, determine whether $ p_k $ is a substring of $ U $, i.e., whether there exists an integer $ i \\ge 0 $ such that:  \n$$\nU[i:i+|p_k|] = p_k\n$$  \nOutput \"YES\" if true, \"NO\" otherwise.","simple_statement":"Check if a given string is a substring of the infinite string \"_abcdefghijklmnopqrstuvwxyz_\" repeated forever. Print \"YES\" if it is, \"NO\" otherwise.","has_page_source":false}