{"raw_statement":[{"iden":"statement","content":"Lucas really wanted to create an interesting problem with strings, but he spent so much time thinking that he ended up with no creativity to create a better statement for this problem.\n\nThe problem he came up with is the following:\n\nGiven an array v of strings, answer these queries: \n\nIn the first line of input, there is an integer n (1 ≤ n ≤ 105) indicating the size of the array v. The following n lines display the contents of the array, where the (i + 1)-th line is the string in the i-th position in the array.\n\nIn the (n + 2)-th line, there is an integer q (1 ≤ q ≤ 105), the number of queries to be executed. The following q lines contain the description of the q queries, one per line.\n\nEach query is described as follows:\n\nFor each query of type 2 and 3, print \"_Y_\" if the query's answer is true or \"_N_\" if it's false.\n\n"},{"iden":"input","content":"In the first line of input, there is an integer n (1 ≤ n ≤ 105) indicating the size of the array v. The following n lines display the contents of the array, where the (i + 1)-th line is the string in the i-th position in the array.In the (n + 2)-th line, there is an integer q (1 ≤ q ≤ 105), the number of queries to be executed. The following q lines contain the description of the q queries, one per line.Each query is described as follows:  Type 1: 1 i s, where i is an integer (1 ≤ i ≤ n) and s is a string.  Type 2: 2 l r s, where l and r are integers (1 ≤ l ≤ r ≤ n) and s is a string.  Type 3: 3 l r s, where l and r are integers (1 ≤ l ≤ r ≤ n) and s is a string. "},{"iden":"output","content":"For each query of type 2 and 3, print \"_Y_\" if the query's answer is true or \"_N_\" if it's false."},{"iden":"note","content":"  The sum of the lengths of the strings initially in the array does not exceed 5 * 105.  The sum of the lengths of the strings in the queries does not exceed 5 * 105.  All strings contain only lower case characters.  String a is a prefix of string b if: . "}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the size of the array $ V = (s_1, s_2, \\dots, s_n) $, where each $ s_i \\in \\Sigma^* $ is a string over some alphabet $ \\Sigma $.  \nLet $ q \\in \\mathbb{Z} $ be the number of queries.  \n\n**Constraints**  \n1. $ 1 \\le n \\le 10^5 $  \n2. $ 1 \\le q \\le 10^5 $  \n3. Each query is of type 1, 2, or 3 (implied by context, though not fully specified).  \n4. For queries of type 2 and 3, output \"_Y_\" if true, \"_N_\" if false.  \n\n**Objective**  \nProcess $ q $ queries on array $ V $; for each query of type 2 or 3, output \"_Y_\" or \"_N_\" based on the query's condition (unspecified).","simple_statement":"Given an array of strings, process queries: for each query, output \"_Y_\" or \"_N_\" based on the condition.","has_page_source":false}