## Problem

### Description

Shinku is very interested in the set. One day, she got sets, and the number is in the set. But she doesn’t think it is interesting enough, so she applies magic to these sets. There are three kinds of magic:

• : If the and numbers are not in one set, then the Shinku’s magic will merge the set containing the number and the set containing the number.
• : Shinku’s magic adds to each number in the set containing the number.
• : Shinku can immediately know how many numbers in the set containing the number satisfy .

But unfortunately, for some reason the type magic fails. So Shinku wants you to tell her the answer after every type magic.
Note that there can be multiple numbers with the same value in one set, that is, numbers with the same value will not disappear when merged.

### Input

The first line contains two integers , the number of initial sets and the number of the magic.
The second line contains integers. The number is the number in the set initially.
The next lines describe the sequence of magic. The line describes the magic. Each magic is a magic as described above.

### Output

For each type magic, output the answer you are asked to calculate.

### Explanation

After the first operation, the numbers are , sets are
For the second operation, the third number is in , , , so the answer is .
After the third operation, the numbers are , sets are
After the forth operation, the numbers are , sets are
For the fifth operation, ,the third number is in , , ,, so the answer is .

### Source

ACM-ICPC 2018 南京赛区网络预赛

## Translation

• 将第个数和第个数所在集合合并
• 将第个数所在集合所有数加
• 所在集合有多少个数模