CSES - Pizzeria Queries
  • Time limit: 1.00 s
  • Memory limit: 512 MB

There are nn buildings on a street, numbered 1,2,,n1,2,\dots,n. Each building has a pizzeria and an apartment.

The pizza price in building kk is pkp_k. If you order a pizza from building aa to building bb, its price (with delivery) is pa+abp_a+|a-b|.

Your task is to process two types of queries:

  1. The pizza price pkp_k in building kk becomes xx.
  2. You are in building kk and want to order a pizza. What is the minimum price?

Input

The first input line has two integers nn and qq: the number of buildings and queries.

The second line has nn integers p1,p2,,pnp_1,p_2,\dots,p_n: the initial pizza price in each building.

Finally, there are qq lines that describe the queries. Each line is either "1 kk xx" or "2 kk".

Output

Print the answer for each query of type 2.

Constraints

  • 1n,q21051 \le n,q \le 2 \cdot 10^5
  • 1pi,x1091 \le p_i, x \le 10^9
  • 1kn1 \le k \le n

Example

Input:

6 3
8 6 4 5 7 5
2 2
1 5 1
2 2

Output:

5
4