using namespace std;
using ll=long long;
using ld=long double;
using plst=pair<ll,string>;
using pll=pair<ll,ll>;
//#define int
ll n,m,k;
ll a[200011];
struct BIT{
ll s[200011];
inline ll lowbit(ll x){return x&(-x);}
inline void add(ll x,ll t){
while(x<=n){
s[x]^=t;
x+=lowbit(x);
}
}
inline ll sum(ll x){
ll ans=0;
while(x){
ans^=s[x];
x-=lowbit(x);
}
return ans;
}
}t[2];
void solve(){
cin>>n>>m;
for(int i=1;i<=n;i++){
cin>>a[i];
t[i&1].add(i,a[i]);
}
//如果x,y的奇偶性相同,那么和就是奇数位置异或,否则就是0
for(int i=1;i<=m;i++){
ll op,x,y;cin>>op>>x>>y;
if(op==1){
t[x&1].add(x,a[x]^y);
a[x]=y;
}else{
if((x&1)^(y&1)){
puts("0");
}else printf("%ld\n",t[x&1].sum(y)^t[x&1].sum(x-1));
}
}
}
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
solve();
// whatcanisay manbaout
}```