{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003e\nHabib and Anika\u0027s main theme was to bring order to a set of points in a two-dimensional space, skillfully sorting them in ascending order. Through collaborative precision, they revealed the inherent beauty in the organized arrangement of diverse coordinates.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eAnitha passed - killer told.. “Dude, 5 2 is going”\u003c/li\u003e\n\u003cli\u003eChitra passed - Jumbo told.. “Dude, 6 4 is awesome”\u003c/li\u003e\n\u003cli\u003eDivya passed - Baabi told.. “Machi 1 6 is my dream girl”\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eGirls couldn’t understand those code words. To crack the code word, girls decide to record all the code words and the girls\u0027 name whenever they call.\u003c/p\u003e\n\u003cp\u003eThe silencer in the class watched all these and got angry. He mugged up all the code words, went to teacher and complained about the naughty boys and naughty girls.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eTeacher\u003c/strong\u003e: Who is the girl with code word 1 6?\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eSilencer\u003c/strong\u003e: Divya\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTeacher\u003c/strong\u003e: Who is the girl with code word 5 2?\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eSilencer\u003c/strong\u003e: Anitha\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTeacher\u003c/strong\u003e: What is the code word for me?\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eSilencer\u003c/strong\u003e: (puzzled)\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eNow you have to pretend that you are the Silencer to solve this problem. Record the code words and answer the questions the teacher asks you. (She may ask the same question any number of times.)\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003eNote: There can be any number of code words for a same girl. If there exist more than one girl for a same code word, then that code word belongs to the latest girl.\u003c/strong\u003e\u003c/p\u003e\n\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line contains an integer n, the number of figures. Then in each of the next n lines there will be 2 integers and a figure name.\u003c/p\u003e\n\u003cp\u003eAfter that there will be an integer t, the number of test cases. For each test case, there will be two integers representing the code word. Print the figure’s name corresponding to the code word.\u003c/p\u003e\n\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each test case output the figure name.\u003c/p\u003e\n\n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cp\u003e1 \u0026lt;\u003d n \u0026lt;\u003d 100000\u003c/p\u003e\n\u003cp\u003e1 \u0026lt;\u003d t \u0026lt;\u003d 100000\u003c/p\u003e\n\u003cp\u003e-1000000 \u0026lt;\u003d code1, code2 \u0026lt;\u003d 1000000\u003c/p\u003e\n\u003cp\u003eThe figure’s name will not exceed 20 characters.\u003c/p\u003e\n\n\u003ch3\u003eExample\u003c/h3\u003e\n\u003cdiv\u003e\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\u003e6\n5 2 Anitha\n6 4 Yamuna\n6 4 Chitra\n1 6 Divya\n-2 0 Teacher\n7 4 Anitha\n2\n-2 0\n6 4\n\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eTeacher\nChitra\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\u003cstrong\u003eHint\u003c/strong\u003e: Use map.\u003c/p\u003e\n\u003c/div\u003e"}}]}