The group chat was once buzzing with messages, reactions, memes and jokes every second just like the peak of every group chat. Alas, the glory days are now over, only Aritro sends messages in the chat now. The others have a life now!
There are $$$N$$$ inactive friends in the chat. Aritro sends messages one by one, and each message is assigned an id equal to the number of messages sent so far, including this message. So his first message has id $$$1$$$, his second has id $$$2$$$, and so on.
A friend can come online at any point. When friend $$$f$$$ comes online, he reads all messages that have been sent so far, and then immediately goes offline. If Aritro sends more messages after that, friend $$$f$$$ will not see them unless he comes online again.
You will be given events in order. Each event is one of the following:
Note: A friend reads message $$$s$$$ if and only if he came online at a time when at least $$$s$$$ messages had already been sent.
Constraints
Input is given in the following format:
Line $$$1$$$: $$$N\ Q$$$
Line $$$1 + i$$$ $$$(1 \le i \le Q)$$$: The $$$i$$$-th query, starting with its type $$$t$$$, represented as one of the following:
For every query of type , print the number of people that have seen the message with id $$$s$$$.
| Group | Add. constraints | Points |
| $$$1$$$ | $$$N = 1$$$ | $$$10$$$ |
| $$$2$$$ | $$$N,Q \le 5000$$$ | $$$20$$$ |
| $$$3$$$ | All type 3 queries appear after all other queries | $$$30$$$ |
| $$$4$$$ | No additional constraints | $$$40$$$ |
4 11112 13 1112 23 12 32 43 4
1 2 3
Query types:
Explanation of the Example:
| Name |
|---|


