PROGRAMMING:Quick sort
As we all know, Keven is an acmer. He just learned quick sorting today. He is very happy because he can quickly find the number with the lowest K in the interval. However, JOJO, who is also acmer, can't see it any more. He thinks that quick sorting should be well known. So JOJO asked Keven the following questions:
You need to complete n operations, all of which belong to the following three types
1. 'add X', where 'Add' is a string and 'x' is a number, indicating that x is added to the sequence** 1<= $$X$$ <=200000**
2. 'delete X ', where' Delete 'is a string and X is a number, indicating that x is deleted from the sequence** Ensure that the number $$x $$must be in the original sequence**
3. 'query X', where 'query' is a string and X is a number, which means to find the kth smallest number in the current sequence** 1 < = $$x $$< = current sequence length**
###Input format:
The first line gives a number n for the total number of operations$$ 1<=N<=200000$$
Next, N lines, each with a string and a number, represent one of the above three operations.
###Output format:
Each 'query' command outputs the kth smallest number in the sequence on one line.
###Input example:
```in
ten
add 5
query 1
add 3
query 1
query 2
add 5
query 2
query 3
detele 3
query 1
```
###Output example:
```out
five
three
five
five
five
five
```
###Tips:
In the first query, the sequence is' 5 ', the first small value is queried and' 5 'is output`
In the second query, the sequence is' 3 5 ', the first small value is queried and' 3 'is output`
In the third query, the sequence is' 3 5 ', the second smallest value is queried and' 5 'is output`
In the fourth query, the sequence is' 3 5 5 ', the second smallest value is queried and' 5 'is output`
In the fifth query, the sequence is' 3 5 5 ', the third smallest value is queried and' 5 'is output`
In the sixth query, the sequence is' 5 ', the first small value is queried and' 5 '< br > < br > < br > < br > is output
answer:If there is no answer, please comment
You need to complete n operations, all of which belong to the following three types
1. 'add X', where 'Add' is a string and 'x' is a number, indicating that x is added to the sequence** 1<= $$X$$ <=200000**
2. 'delete X ', where' Delete 'is a string and X is a number, indicating that x is deleted from the sequence** Ensure that the number $$x $$must be in the original sequence**
3. 'query X', where 'query' is a string and X is a number, which means to find the kth smallest number in the current sequence** 1 < = $$x $$< = current sequence length**
###Input format:
The first line gives a number n for the total number of operations$$ 1<=N<=200000$$
Next, N lines, each with a string and a number, represent one of the above three operations.
###Output format:
Each 'query' command outputs the kth smallest number in the sequence on one line.
###Input example:
```in
ten
add 5
query 1
add 3
query 1
query 2
add 5
query 2
query 3
detele 3
query 1
```
###Output example:
```out
five
three
five
five
five
five
```
###Tips:
In the first query, the sequence is' 5 ', the first small value is queried and' 5 'is output`
In the second query, the sequence is' 3 5 ', the first small value is queried and' 3 'is output`
In the third query, the sequence is' 3 5 ', the second smallest value is queried and' 5 'is output`
In the fourth query, the sequence is' 3 5 5 ', the second smallest value is queried and' 5 'is output`
In the fifth query, the sequence is' 3 5 5 ', the third smallest value is queried and' 5 'is output`
In the sixth query, the sequence is' 5 ', the first small value is queried and' 5 '< br > < br > < br > < br > is output
answer:If there is no answer, please comment