SP7403 MESS - Messy Administration

Description

For the fall semester 2010, EPFL proudly welcomed 2’300 new students to the campus. Handling their registrations to the different sections and levels requires an administrative masterstroke. Nowadays this process is highly automated and worked impeccably up to this year... ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP7403/71fe4e1146d30370da3feb1dd2985913deccfbd5.png) The software that handles the registrations wasn’t lead out for such a huge number of new students and the secretaries were close to a heart attack when they received the registration printouts. Instead of receiving one sheet per class (defined by the orientation of studies and the level, e.g. Architecture, Bachelor 1) containing the list of all the students registered to that class, the printouts contained sentences in 5 different formats: - ! _STUDENT\_ID1_ studies _SECTION_ - ! _STUDENT\_ID1_ enters semester _SEMESTER_ - ! _STUDENT\_ID1_ and _STUDENT\_ID2_ chose the same studies - ! _STUDENT\_ID1_ and _STUDENT\_ID2_ are in same semester - ! _STUDENT\_ID1_ and _STUDENT\_ID2_ are in same class _STUDENT\_ID1_ and _STUDENT\_ID2_ are the 6-digit sciper numbers, _SEMESTER_ is an integer number in the range from 1 to 10 and _SECTION_ is a one-worded string. The secretaries were very puzzled and couldn’t figure out how to recreate the expected lists from these printouts. But luckily they remembered PolyProg. The desperate secretaries provide you with the printouts and you are to answer their impatient questions to your best. - ? What does _STUDENT\_ID1_ study - ? Which semester will _STUDENT\_ID1_ enter - ? Are _STUDENT\_ID1_ and _STUDENT\_ID2_ classmates Two students are considered to be classmates if and only if they study the same subject and enter the same semester. Answering to your best means that your answer must be as complete as possible, you must never give an erroneous answer, but you can just admit that the input was insufficient to answer a question at the point in time it was asked. Your answers shall respect the following priority: **Question** **Answer** ? What does _STUDENT\_ID1_ study _STUDENT\_ID1_ studies _SECTION_ Sorry, I have no clue yet ? Which semester will _STUDENT\_ID1_ enter _STUDENT\_ID1_ enters semester _SEMESTER_ Sorry, I have no clue yet ? Are _STUDENT\_ID1_ and _STUDENT\_ID2_ classmates Yes, _STUDENT\_ID1_ and _STUDENT\_ID2_ are classmates No, this is not possible Possible, given that _STUDENT\_ID1_ and _STUDENT\_ID2_ study the same subject Possible, given that _STUDENT\_ID1_ and _STUDENT\_ID2_ are in the same semester Sorry, I have no clue yet **INPUT** The input consists of a single test-case with no more than 1’000 printout sentences and no more than 500 questions. They may be mixed and you are to go through them in sequential order, which means that in order to answer a question, you must not rely on any information further down the list. You may safely assume that the sentences are not contradictory! Input terminates on a line containing the single word END. **OUTPUT** Output your answers, one per line and terminate with a newline. Be aware of typos :) **SAMPLE INPUT** ! 166554 and 175129 chose the same studies ! 175129 and 170113 are in same semester ! 166554 studies electronics ! 169983 and 170113 chose the same studies ? Are 170113 and 169983 classmates ! 169983 enters semester 9 ! 175129 and 169983 are in same semester ? Which semester will 170113 enter ? Are 169983 and 170113 classmates ? Which semester will 166554 enter ? What does 175129 study ! 169983 studies communicationsystems ? Are 166554 and 169983 classmate END **SAMPLE OUTPUT** Possible, given that 170113 and 169983 study the same subject 170113 enters semester 9 Yes, 169983 and 170113 are classmates Sorry, I have no clue yet 175129 studies electronics No, this is not possible

Input Format

N/A

Output Format

N/A