{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eNow is spring ! The sunshine is warm , the flowers is coming out . How lovely it is! So my classmates and I want to go out for a spring-outing.\u003cbr\u003e\u003cbr\u003eBut we all select courses ourselves. We don\u0027t have classes at the same time.Now our monitor has a big trouble in arranging the time of the spring-outing.\u003cbr\u003e\u003cbr\u003eCan you help him?\u003cbr\u003e\u003cbr\u003eI will give you our courses information and the time of the spring-outing.You just need to tell me that who can\u0027t go with us. \u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains an integer CA which indicates the number of test cases.\u003cbr\u003eThen CA cases follow.\u003cbr\u003eEach case contains two parts,the students\u0027 courses information and the query.\u003cbr\u003e\u003cbr\u003eIn the first part ,first there is an integer N(N\u0026lt;200) which means the number of the student,and then comes the N students’ courses information.\u003cbr\u003eA student\u0027s courses information is in this format:\u003cbr\u003e\u003cbr\u003eline1: name K\u003cbr\u003eline2: day1 b1 e1\u003cbr\u003e.....\u003cbr\u003elineK+1: dayK bK eK\u003cbr\u003e\u003cbr\u003eThe first line of a student\u0027s courses infomation contains his name(less than 20 characters and in lowercase) and the number(K,K\u0026lt;1000) of his courses . Then next K lines describe his courses. Each Line contain three integers indicate the day of a week( 1 \u0026lt;\u003d day \u0026lt;\u003d 7 means Monday to Sunday ), the begin time and the end time of the course.\u003cbr\u003eTo make the problem easier,the begin time and the end time will be in the range from 1 to 11 .(Because in HDU,there is 11 classes one day).\u003cbr\u003e\u003cbr\u003eIn the query part , first there is an integer Q which means the query number,and then Q lines follow.\u003cbr\u003eA query contains three integers which means the day ,the begin time and the end time of the spring-outing.And the time is described as the courses.\u003cbr\u003eNotice,everyone may have more than one course at the same time for some special reasons.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each query , just print the names of the students who can\u0027t go out for a spring-outing in a line in lexicographic order.\u003cbr\u003ePlease separate two names with a blank.\u003cbr\u003eIf all of the students have time to go , just print \"None\" in a line.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e1\r\n3\r\nlinle 3\r\n1 1 2\r\n2 3 4\r\n3 8 10\r\nlaili 1\r\n4 1 4\r\nxhd 2\r\n1 2 4\r\n4 5 6\r\n3\r\n1 2 2\r\n4 4 5\r\n5 1 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003elinle xhd\r\nlaili xhd\r\nNone\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}