SP31591 ALLIN1 - All in One
Description
_Before you begin, you should try this problem! [AVL Tree](../SDITSAVL/)_
This problem is simple. Initially, there is a list and it's empty. Then you are given four types of query.
1. Insert data to the list
2. Remove data from the list
3. Print an index (1-based) from a specified data after the list was sorted ascendingly
4. Print data from a specified index (1-based) after the list was sorted ascendingly
Input Format
Input contains several lines. Each line follows one of these formats.
**1 n**: Insert **n** (0
Output Format
For each query 3, print **n**'s index in one line. If **n** was not found, just print -1
For each query 4, print data on **i-**th index in one line. If the index is not valid, just print -1