#include <vector>
#include <iostream>
using namespace std;

void init(int N, vector<int> A) {

}

void change(int p, int x) {

}

void perturb(int l, int r) {

}

int calc(int p) {
    return 0;
}

// SAMPLE GRADER. DO NOT MODIFY BELOW THIS LINE

#ifndef EVAL
int main() {
    ios::sync_with_stdio(0);
	cin.tie(0);

    int N, Q; cin >> N >> Q;
    vector<int> A(N, 0);
    for (int i = 0; i < N; i++) {
        cin >> A[i];
    }
    init(N, std::move(A));

    for (int i = 0; i < Q; i++){
        int type; cin >> type;
        if (type == 1) {
            int p, x; cin >> p >> x;
            change(p, x);
        } else if (type == 2) {
            int l, r; cin >> l >> r;
            perturb(l, r);
        } else {
            int p; cin >> p;
            cout << calc(p) << "\n";
        }
    }
}
#endif
