There is a set with size n initially, and there are q operations, each operation will be one of the following cases:

Add x: add x to this set.

Delete: delete the minimum element of the set.

Query: print the minimum element of the set.

Submit: 1555 Solved: 174

[Submit][Status][Web Board]

There is a set with size n initially, and there are q operations, each operation will be one of the following cases:

Add x: add x to this set.

Delete: delete the minimum element of the set.

Query: print the minimum element of the set.

The first line will be an integer T, which is the number of test cases. (1 <= T <= 10). For each test case, the first line will be an integer n(1 <= n <= 10^{6}), then the second line will be n integers, they make up the initial set. The third line will be an integer q(1 <= q <= 10^{5}), it means the number of operations. Then followed by q lines, each line will be one of the following cases:

1 x: Add x.

2: Delete.

3: Query.

For each “Query”, print the minimum element of the set.

```
1
1
1
1
3
```

`1`

We guarantee that all values are less than or equal to 10^{9}.