**Problem Description**

**Input**

An integer T in the first line, then follows T groups of test data.

In each data group, there are two integers n and m in the first line. Then n Integers a[1]~a[n] in the second line are the initial value of the sequence. Then m lines of operations. One operation each line. There are 3 types of operations:

GCD l r :calculate the GCD in section a[l]~a[r].

SUM l r :calculate the SUM in section a[l]~a[r].

SET l r val :set all the numbers in section a[l]~a[r] to the value of val.

(0<=n<=10000,0<=M<=10000,0<=val<=10000)

**Output**

Each line an integer of an operation’s result behind the command(GCD or SUM).

**Sample Input**

1 3 4 5 10 15 GCD 1 3 SUM 1 3 SET 1 3 10 GCD 1 3

**Sample Output**

GCD 5 SUM 30 GCD 10

**Source**

2014市赛