Yuta has an array A_1, A_2, …, A_n with n integers, and he keeps a copy of the initial contents of array A as A′ (initially, A′_i=A_i). Then he executes m operations on the array A.
There are three types of operations:
for (int i = l; i <= r; i++) A[i] = A[i - k];Help Yuta execute all the given operations.
The first line of the input contains two integers n and m (1≤n,m≤2⋅105).
The second line contains n integers A_i (0≤A_i≤109).
Then m lines follow, each line describes an operation in the format shown above. It is guaranteed that 1≤l≤r≤n and 1≤k<l.
For each operation of the first type, print a single line with a single integer: the required sum.