{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\nIn Marjar University, students in College of Computer Science will learn EON (Edward Object Notation), which is a hierarchical data format that uses human-readable text to transmit data objects consisting of attribute-value pairs. The EON was invented by Edward, the headmaster of Marjar University.\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nThe EON format is a list of key-value pairs separated by comma \",\", enclosed by a couple of braces \"{\" and \"}\". Each key-value pair has the form of \"\u0026lt;key\u0026gt;\":\"\u0026lt;value\u0026gt;\". \u0026lt;key\u0026gt; is a string consists of alphabets and digits. \u0026lt;value\u0026gt; can be either a string with the same format of \u0026lt;key\u0026gt;, or a nested EON.\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nTo retrieve the data from an EON text, we can search it by using a key. Of course, the key can be in a nested form because the value may be still an EON. In this case, we will use dot \".\" to separate different hierarchies of the key.\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nFor example, here is an EON text:\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\n{\"headmaster\":\"Edward\",\"students\":{\"student01\":\"Alice\",\"student02\":\"Bob\"}}\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\u003c/p\u003e\u003cul\u003e\r\n\u003cli\u003eFor the key \"headmaster\", the value is \"Edward\".\u003c/li\u003e\r\n\u003cli\u003eFor the key \"students\", the value is {\"student01\":\"Alice\",\"student02\":\"Bob\"}.\u003c/li\u003e\r\n\u003cli\u003eFor the key \"students\".\"student01\", the value is \"Alice\".\u003c/li\u003e\r\n\u003c/ul\u003e\u003cp\u003e\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nAs a student in Marjar University, you are doing your homework now. Please write a program to parse a line of EON and respond to several queries on the EON.\r\n\u003c/p\u003e\r\n\r\n\u003ch4\u003eInput\u003c/h4\u003e\r\n\r\n\u003cp\u003eThere are multiple test cases. The first line of input contains an integer \u003cvar\u003eT\u003c/var\u003e indicating the number of test cases. For each test case:\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nThe first line contains an EON text. The number of colons \":\" in the string will not exceed 10000 and the length of each key and non-EON value will not exceed 20.\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nThe next line contains an integer \u003cvar\u003eQ\u003c/var\u003e (0 \u0026lt;\u003d \u003cvar\u003eQ\u003c/var\u003e \u0026lt;\u003d 1000) indicating the number of queries. Then followed by \u003cvar\u003eQ\u003c/var\u003e lines, each line is a key for query. The querying keys are in correct format, but some of them may not exist in the EON text.\r\n\u003c/p\u003e\r\n\r\n\u003cp\u003e\r\nThe length of each hierarchy of the querying keys will not exceed 20, while the total length of each querying key is not specified. It is guaranteed that the total size of input data will not exceed 10 MB.\r\n\u003c/p\u003e\r\n\r\n\u003ch4\u003eOutput\u003c/h4\u003e\r\n\r\n\u003cp\u003e\r\nFor each test case, output \u003cvar\u003eQ\u003c/var\u003e lines of values corresponding to the queries. If a key does not exist in the EON text, output \"Error!\" instead (without quotes).\r\n\u003c/p\u003e\r\n\r\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\r\n1\r\n{\"hm\":\"Edward\",\"stu\":{\"stu01\":\"Alice\",\"stu02\":\"Bob\"}}\r\n4\r\n\"hm\"\r\n\"stu\"\r\n\"stu\".\"stu01\"\r\n\"students\"\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\r\n\"Edward\"\r\n{\"stu01\":\"Alice\",\"stu02\":\"Bob\"}\r\n\"Alice\"\r\nError!\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n"}}]}