Lets uncomplicate the story.
Given the N numbers (ai where 0 <= i < N), perform 3 kinds of queries:
Input Format
First line contains a single integer N - denoting the total number of numbers.
Second line contains N space-separated integers.
Third line contains a single integer Q - denoting the number of queries.
Q lines follow.
For every query of type 0, the query is of the form - 0 X Y - where 0 represents the query type and X,Y are the starting and ending numbers respectively.
For every query of type 1, the query is of the form 1 Z - where 1 represents the query type and Z is the number whose one occurance to be deleted.
For every query of type 2, the query is of the form 2 Z - where 2 represents the query type and Z is the number which is to be inserted anywhere in array.
Output format
Print the answer for every query of type 0 on a new line.
Constraints
1 <= N <= 106
0 <= ai <= 105
1 <= Q <= 106