Program cog1427;
Var
A,C:Array[1..100010]Of Longint;
N,M,F,I,J:Longint;
Procedure Add(P,X:Longint); Inline;
Begin
While P<=N Do
Begin
C[P]:=C[P] Xor X;
Inc(P,P And -P);
End;
End;
Function Sum(P:Longint):Longint; Inline;
Var
S:Longint;
Begin
S:=0;
While P>0 Do
Begin
S:=S Xor C[P];
Dec(P,P And -P);
End;
Exit(S);
End;
Begin
Assign(Input,'zwei.in');
Assign(Output,'zwei.out');
Reset(Input);
Rewrite(Output);
Readln(N,M);
Filldword(C,N+1,0);
For I:=1 To N Do
Begin
Read(A[I]);
C[I]:=C[I] Xor A[I];
If I+I And -I<=N Then C[I+I And -I]:=C[I+I And -I] Xor C[I];
End;
Repeat
Readln(F,I,J);
If F=0
Then Begin
Add(I,A[I] Xor J);
A[I]:=J;
End
Else Writeln(Sum(I-1) Xor Sum(J));
Dec(M);
Until M=0;
Close(Input);
Close(Output);
End.