You will be given an array A of n integers and q operations. There are two types of operations:
1 x y
, for this operation, you should replace all the occurrences of element in the array with 2 idx
, output the value Input starts with an integer (), denoting the number of test cases.
The first line of each case contains two integers and (). The next line contains space separated integers , , , …, () forming the initial array.
Each of the next lines contains the described operations:
1 x y
: 2 idx
: For each test case, print ( is the test case number) in the first line. Then for each 2nd type of operation, output the answer.
Input | Output |
---|---|
1 5 4 1 2 3 4 5 1 1 3 2 1 1 3 5 2 1 | Case 1: 3 5 |
After the first update:
After the second update:
|