Sherlock has enrolled himself in a University to improve his Computer Science skills. This semester he had a course on Data Structures and was given the following problem for his end semester exams-
Design a suitable data structure which supports Q queries which can be of the following types:
Input Format
First line contains Q, the number of queries.
Next Q lines contains queries of the mentioned types.
Constraints
Output Format
Output the answer to each query on a new line.