Set

Maintain a set of integers 1 to 20 under add, remove, toggle, check, all, and empty, and print each check result.

Easy3Bit manipulationImplementationInterviewNo attempts yetTime limit1.5sMemory limit4 MB

Problem

You start with an empty set SS. Write a program that performs the following operations.

  • add x: adds xx to SS. If xx is already in SS, the operation is ignored.
  • remove x: removes xx from SS. If xx is not in SS, the operation is ignored.
  • check x: prints 1 if xx is in SS, and 0 otherwise.
  • toggle x: removes xx from SS if xx is in SS, and adds xx otherwise.
  • all: replaces SS with {1,2,,20}\{1, 2, \ldots, 20\}.
  • empty: replaces SS with the empty set.

For add, remove, check and toggle, the argument satisfies 1x201 \le x \le 20.

Input

The first line contains the number of operations MM (1M3,000,0001 \le M \le 3{,}000{,}000).

Each of the next MM lines contains one operation. It is one of the six operations described above, and an operation that takes an argument has its name and xx separated by a single space.

Output

For every check operation, print its result on its own line, in the order the operations are given.

If there is no check operation, print nothing.