## Wrong Operator

You are writing a problem:

Given an array of length , perform operations, each in one of the following forms:

`0 l r x`

: set to to to .`1 l r`

: compute

Yesterday, you realized you accidentally replaced all signs with signs (except the ones in subscripts), where denotes the modulus operator. You think this is a much more interesting problem. Find a solution!

Modulus is left to right associative. This means type `1`

operations are in the form . In this question, redefine .

#### Input Specification

The first line contains two space-separated integers: and .

The next line contains space-separated integers: the array for .

The next lines each contain one query in one of the formats above with and .

For 20% of the points, , and each element in and all `x`

in type `0`

operations are .

For another 30% of the points, there are no type `0`

operations.

#### Output Specification

For each type `0`

operation `0 l r x`

, set to to to .

For each type `1`

operation `1 l r`

, compute , and output the answer on a separate line.

#### Sample Input

```
5 3
5 3 4 3 3
1 0 4
0 1 3 2
1 0 1
```

#### Sample Output

```
2
0
```

## Comments