Cheburashka and Crocodile Gena
When Cheburashka and Crocodile Gena nothing to do, they play different interesting games. Today, Gena came up with a new game, which, in his opinion, will help Cheburashka to learn arithmetic. The rules of the game are very simple: Gena takes tablets, numbers them from to and writes on them any numbers. Then he will say two numbers and , and Cheburashka must calculate the sum of all the numbers on the tablets numbered from to .
So that Cheburashka will not learn all the possible answers, Gena sometimes changes some numbers on the other, namely, all the numbers in the interval . He does not want to think much, so just writes on these tablets the numbers from to in order. Cheburashka is not very well in arithmetic, so he asks you to write a program that will help him in this problem.
Input
The first line contains the number of tablets . The next line contains integers — the initial values on the tablets (all numbers do not exceed ). Next given the number of queries . Then goes lines, the first number in a string is a type of the query .
If , then given two integers and . You must calculate the sum of all the numbers on the tablets numbered from to ;
If , then given two integers and . It means that on the tablets with numbers from to now will be values from to correspondingly.
It is guaranteed that query segments are usually correct. The numbering of tablets starts from one.
Output
For each query with number print the sum of numbers on a segment .