The first line has a number T (T ≤ 10), indicating the number of test cases.
For each test case, the first line contains tow integers n, m, (1≤n, m≤20000), denote the n, m that appear in the above description. Then next line contains n non-negative integers denote
Then next m lines. Each line is one of the follow two:
1)C x y: set the value of ax
2)Q x: calculate F(x) mod P, where P = 1000000007.
The number of the first operation is not more than 5000.