{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eCarneginon was a chic bard. But when he was young, he was frivolous and had joined many gangs. Recently, Caneginon was to be crowned, because the king was shocked by his poems and decided to award him the gold medal lecturer. Therefore, Most of people in the Kingdom came to visit him.\u003c/p\u003e\n\u003cp\u003eHowever, as a medal lectirer, Carneginon must treat the visitors kindly, including elders and younger generations. In order to maintain order, every visitor received a license with a magic field engraved on it. And the magic field on the licence was made up of lowercase letters.\u003c/p\u003e\n\u003cp\u003eCarneginon had a unique licence, which could judge whether others are his older or younger. Now, we assume that the sequence on Carneginon\u0027s licence is $T$ and the sequence on visitors\u0027 licence is $S$. For each visitor,\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e\u003cp\u003eIf the length of $T$ is longer than the length of $S$, it\u0027s obviously that the visitor is younger. And if $S$ is a substring of $T$, Carneginon would call the visitor \u003ccode\u003emy child!\u003c/code\u003e. Otherwise, Carneginon would call the visitor \u003ccode\u003eoh, child!\u003c/code\u003e.\u003c/p\u003e\u003c/li\u003e\n \u003cli\u003e\u003cp\u003eIf the length of $T$ is less than the length of $S$, it\u0027s obviously that the visitor is elder. And if $T$ is a substring of $S$, Carneginon would call the visitor \u003ccode\u003emy teacher!\u003c/code\u003e. Otherwise, Carneginon would call the visitor \u003ccode\u003esenior!\u003c/code\u003e.\u003c/p\u003e\u003c/li\u003e\n \u003cli\u003e\u003cp\u003eOf course, if the length of $T$ is equal to the length of $S$, the visitor is Carneginon\u0027s peer. And if $T$ is equal to $S$, it shows that the visitor entered through an improper way and Carneginon would shout \u003ccode\u003ejntm!\u003c/code\u003e. Otherwise, Carneginon would call the visitor \u003ccode\u003efriend!\u003c/code\u003e.\u003c/p\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eNow, you know the $T$ (Carneginon\u0027s licence), $q$ (the number of visitors) and each visitor\u0027s licence($S_i$). Can you judge what Caneginon needs to say when he sees every visitor?\u003c/p\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line is a string $T$, representing Carneginon\u0027s license.\u003c/p\u003e\n\u003cp\u003eThe second line is and integer $q$, which means the number of visitors.\u003c/p\u003e\n\u003cp\u003eThen $m$ lines, for each line, there is a string $S$, denoting the visitor\u0027s license.\u003c/p\u003e\n\u003cp\u003e$1 \\leq |T| \\leq 10^5$, $1 \\leq |S| \\leq 10^5$, $1 \\leq q \\leq 1000$\u003c/p\u003e\n\u003cp\u003eIt is guaranteed that $q \\times (|S|+|T|) \\leq 10^7$.\u003c/p\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eThere are $q$ lines.\u003c/p\u003e\n\u003cp\u003eFor each $S$, output what Carneginon should say correctly.\u003c/p\u003e"}},{"title":"Sample 1","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\u003eabcde\n6\nabcde\naaaaa\nabcd\naaaa\nabcdef\nabccdefg\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ejntm!\nfriend!\nmy child!\noh, child!\nmy teacher!\nsenior!\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}