#CCBCHBAHAI0000115. Q lệnh GET/SET trên mảng tĩnh

Q lệnh GET/SET trên mảng tĩnh

Q GET/SET Operations on a Static Array

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem

Maintain a fixed-size array A=(a0,…,an−1)A=(a_0,\ldots,a_{n-1}) under qq operations. GET p prints the current apa_p; SET p x assigns ap←xa_p\leftarrow x and prints nothing. Every pp is valid and operations are processed in order.

Input

The first line contains n,qn,q, the second line the initial array, followed by qq command lines.

Output

Print one line for each GET command.

Subtask

Subtask 1 (20 points): 1≤n,q≤101\le n,q\le10.

Subtask 2 (30 points): 1≤n,q≤10001\le n,q\le1000.

Subtask 3 (50 points): 1≤n,q≤1051\le n,q\le10^5, values within 10910^9 in magnitude.

Example

Input

4 5
10 20 30 40
GET 1
SET 1 99
GET 1
SET 3 -5
GET 3

Output

20
99
-5

Explanation

Each GET observes all earlier SET operations.