SHARE
TWEET

Untitled

a guest Oct 12th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. possible = {i for i in range(1, int(input()) + 1)}
  2. data = input()
  3. betset = set()
  4. while data != "HELP":
  5.     if data.isalpha():
  6.         if data == "NO":
  7.             possible -= betset
  8.         else:
  9.             possible = possible & betset
  10.     else:
  11.         betset = set(list(map(int, data.split())))
  12.     data = input()
  13. print(*sorted(possible))
RAW Paste Data
Top