This is the final project for the Data structure course held in the fall of 2019.
There is a set of numbers (S) which starts with 0 in it and at each stage, a request can be made which is one of the two options below: 1- The number X is given in the input and must be added to the set of numbers. 2- The number Y is given in the input and the number T must be added to the set of numbers such as Y xor T consist most numbers.
In the first line you must enter the number of requests and each of the request must be in the following format: 1- At first the number 1 and then the number X to add to the set. 2- At first the number 2 and then the numbet Y, which leads to printing the number T.
In the Nth line of the output the answer to the Nth request of type 2 will be printed.