#include using namespace std; using ll = long long; #define rep(i, s, t) for (ll i = s; i < (ll)(t); i++) #define rrep(i, s, t) for(ll i = (ll)(t) - 1; i >= (ll)(s); i--) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define TT template TT using vec = vector; template bool chmin(T1 &x, T2 y) { return x > y ? (x = y, true) : false; } template bool chmax(T1 &x, T2 y) { return x < y ? (x = y, true) : false; } struct io_setup { io_setup() { ios::sync_with_stdio(false); std::cin.tie(nullptr); cout << fixed << setprecision(15); } } io_setup; #include int op(int l,int r){return max(l,r);} int e(){return 0;} void solve(){ int Q; cin>>Q; atcoder::segtreeseg(Q); int now=0; while(Q--){ int t; cin>>t; if(t==1){ int x; cin>>x; seg.set(now,x); now++; }else{ int k; cin>>k; cout<