#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000005 #define Inf64 4000000000000000001LL int op(int a,int b){ return max(a,b); } int e(){ return -Inf32; } int main(){ int _q; cin>>_q; segtree seg(_q+5); int r = 0; rep(_,_q){ int t,x; cin>>t>>x; if(t==1){ seg.set(r,x); r++; } else{ cout<