Preparando MOJI
AquaMoon has three integer arrays $$$a$$$, $$$b$$$, $$$c$$$ of length $$$n$$$, where $$$1 \leq a_i, b_i, c_i \leq n$$$ for all $$$i$$$.
In order to accelerate her potato farming, she organizes her farm in a manner based on these three arrays. She is now going to complete $$$m$$$ operations to count how many potatoes she can get. Each operation will have one of the two types:
As AquaMoon is busy finding the library, help her complete all of their operations.
The first line contains two integers $$$n$$$, $$$m$$$ ($$$1\le n\le 2\cdot10^5$$$, $$$1\le m\le 5\cdot10^4$$$).
The second line contains $$$n$$$ integers $$$a_1, a_2, \dots,a_n$$$ ($$$1\le a_i\le n$$$).
The third line contains $$$n$$$ integers $$$b_1, b_2, \dots,b_n$$$ ($$$1\le b_i\le n$$$).
The fourth line contains $$$n$$$ integers $$$c_1, c_2, \dots,c_n$$$ ($$$1\le c_i\le n$$$).
The next $$$m$$$ lines describe operations, the $$$i$$$-th line describes the $$$i$$$-th operation in one of these two formats:
It is guaranteed that there is at least one operation of the second type.
For each operation of the second type print the answer.
5 4 1 2 3 4 5 2 3 4 5 1 5 1 2 3 4 2 5 1 2 3 2 4 2 5
3 0 2
For the first operation, the triplets are:
There is no satisfying triplet for the third operation.
For the fourth operation, the triplets are: