SP28449 ADALIST - Ada and List
Description
Ada the Ladybug has a TODO-list (containing only numbers - for simplicity). She is still doing something, so she sometimes erases **k** $ ^{th} $ number, sometimes she inserts something on **k** $ ^{th} $ position and sometime she asks for **k** $ ^{th} $ number.
Sadly, she is now searching for a work at position **k** so she doesn't have time to do this herself. Can you help her?
Input Format
The first line will contain **0 < N , the number of elements in TODO-list and number of queries.**
Then a line with **N** numbers follows. Each number **0 means **k** $ ^{th} $ number in her TODO-list.**
Afterward, **Q** lines follow, each beginning with number **1**
1 **k x** means that you will add number **x** to position **k**
2 **k** means that you will erase number from position **k**
3 **k** means that you will print number from position **k**
For all queries, it is true that **1 , **0 (for query **1**, it can be also put to position **\#SizeOfList + 1**)****
You will never get query of type **2** or **3** if the list is empty
Output Format
For each query of type **3**, print **k** $ ^{th} $ numbers