#include #include using namespace atcoder; using namespace std; using ll=long long; using ul=unsigned long long; using ld=long double; using mint = modint1000000007; int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}; int dy[8] = {0, 0, -1, 1, -1, 1, -1, 1}; using Graph=vector>; ll op(ll a,ll b){ return (a^b); } ll e(){ return 0ll; } int main(){ ll N,Q; cin>>N>>Q; segtreeseg(N); for(int i=0;i>a; seg.set(i,a); } while(Q--){ ll x,y; cin>>x>>y; x--; cout<