On a mountain in Mendoza there are $$$N$$$ barrels of malbec arranged in a line, numbered from $$$1$$$ to $$$N$$$ from the base of the mountain to the summit. Each barrel has a fixed capacity. At the beginning of a wine season, all barrels are empty.
The season lasts $$$M$$$ days. On each day, exactly one of the following operations occurs:
The first line contains two integers $$$N$$$ and $$$M$$$ ($$$1 \leq N, M \leq 2 \times 10^{5}$$$), the number of barrels and the number of days in the season, respectively.
The second line contains $$$N$$$ integers $$$A_1, A_2, \dots, A_N$$$ ($$$1 \leq A_i \leq 10^{9}$$$), where $$$A_i$$$ is the capacity of the $$$i$$$-th barrel in liters.
Each of the following $$$M$$$ lines contains three integers and describes an operation:
For each operation of the second type, output a line with an integer indicating the number of liters of malbec the oenologist took.
5 73 15 2 10 61 4 71 5 102 3 42 1 51 1 51 2 122 1 2
11 6 15
For the example, the following images illustrate how much Malbec there is in each barrel after each operation:
The images after the fourth operation and after the last operation were not included since all barrels are empty and look like those in the first image.