You are given an array A consisting of n integers. All its elements are numbered with consecutive integers from 1 to n. Your task is to process m queries. Each of these queries is one of the following kinds:
Your task is to implement a proper data structure to process m given queries for a given array A.
First line of input contains the only integer n --- the initial size of the array A (1≤n≤2⋅105).
Second line of input contains n non-negative integers A_i --- elements of the array A (0≤A_i≤109).
Third line of input contains the only integer m --- the number of queries (1≤m≤2⋅105).
Each of the following lines contains a separate query in the following format:
For any query of the first or the third kind 0≤x_j≤109. For any query of the second kind l_j and r_j do not violate bounds of the array A.
You may assume that at least one query in each test case is of the second kind.
For each query of the second kind output its resulting sum on a separate line.