You are given an integer sequence a_1, a_2, \ldots, a_n (|a_i| \leq 10000, 1 \leq n \leq 50000). On this sequence, you have to perform (m \leq 50000) operations:
Modify the -th element of the sequence.
For given and , print \mathrm{MAX}\ \{ a_i + a_{i+1} + \ldots + a_j \mid x \leq i \leq j \leq y \}.
The first line contains the integer . The second line contains integers, representing the sequence a_1, a_2, \ldots, a_n. The third line contains the integer . The next lines contain the queries in the following form:
: change a_x to (|y| \leq 10000).
: print \mathrm{MAX}\ \{ a_i + a_{i+1} + \ldots + a_j \mid x \leq i \leq j \leq y \}.
For each query, output the required answer.
Example 1