The first major village, Zhangjia Village, has reached its once-in-a-decade election for village chief.
This year, there are two candidates for village chief: Wang Xiaochang and Liu Xiaopeng.
Each villager has their own preference level for the two candidates, represented by an integer $$$a$$$. Specifically:
To secure the election, both candidates can use their "money power" to sway votes. This ability can be used infinitely, and each use costs 1 yuan to increase or decrease someone's preference level by 1.
Xiao Ming, as an observer, happily recorded the highlights of the election in the $$$Q$$$ minutes leading up to it.
Specifically, from $$$Q$$$ minutes before the election to 1 minute before the election, one of the following three events occurred every minute:
Now, Xiao Ming has returned home and is organizing his records. Please help Xiao Ming calculate how much money each candidate spent in each minute for records of type '2' or '3'.
The first line of input contains a positive integer $$$Q$$$, representing the number of records.
The next $$$Q$$$ lines each begin with an integer $$$opt$$$ ($$$1 \le opt \le 3$$$) indicating the record type.
$$$1 \le Q \le 2 \times 10^5$$$
$$$1 \le x \le 10^5$$$
$$$-10^8 \le y \le 10^8$$$
$$$k \ge 1$$$
It is guaranteed that for any record with $$$opt = 2$$$ or $$$3$$$, there are at least $$$k$$$ voters who arrived before that record.
For each record with $$$opt = 2$$$ or $$$opt = 3$$$, output a single integer on a new line representing the amount of money spent.
61 10 101 10 -101 10 02 303 303 20
120 150 0