CHALLENGE: Guess the number
All languages are welcome! Patrik and Susan play the game "Guess a Number". Patrik envisioned a natural number from 1 to n. Susan is trying to guess this number, for this she calls some sets of natural numbers. Patrik began to cheat. On each of Susan's questions, he chooses such a variant of answer YES or NO, so that the set of possible conceived numbers remains as much as possible. For example, if Patrik conceived a number from 1 to 5, and Susan asked about numbers 1 and 2, Patrik will answer NO, and if Susan asks about 1, 2, 3, then Patrik will answer YES. If, however, Susan in her question lists exactly half of the planned numbers, then Patrik from the harmfulness always answers NO. Finally, Patrik responds to all the previous questions of Susan and his answers to them, that is, the set of possible conceived numbers decreases. The first line contains the largest number that Patrik could have thought of. Each next line contains another question for Susan: a set of numbers separated by spaces. The last line of input contains one word HELP. For each question of Susan, take Patrik's answer to this question. After that, output through the space, in ascending order, all the numbers that Patrik could have asked after answering all the questions of Susan. For example: Input data: 10 1 2 3 4 5 2 4 6 8 10 HELP Output data: NO YES 6 8 10