#include<iostream>
using namespace std;
struct kk{
long long u;
};
struct node{
kk p;
};
node d[100001];
void opt1(){
int a,b,c;
cin>>a>>b>>c;
d[a].p.u=c;
}
void opt2(){
int a,b;
cin>>a>>b;
cout<<d[a].p.u<<endl;
}
int main(){
int n,m;
cin>>n>>m;
while(m--){
int o;
cin>>o;
if(o==1)opt1();
if(o==2)opt2();
}
return 0;
}