There are N balls on the number line, each of diameter 1, numbered from 1 through N. Ball i's leftmost point is located at position p_i. Additionally, there is an immovable wall located at position P. You have to process Q queries of one of the following forms:
Calculate the final positions of the balls.
The first line contains three integers N, Q, and P: the initial number of balls, the number of queries, and the position of the wall (1≤N,Q≤105, N≤P≤109).
The second line contains N integers p_1,p_2,…,p_N (0≤p_i<P). It is guaranteed the positions are distinct.
The next Q lines describe the queries and may have one of the following forms:
Print out the final positions of the balls in increasing order on a single line, separated by spaces.