#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a)?"Yes":"No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int , int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<60;
const int INF = 1<<30;
const double PI=acos(-1);
//SegmentTree 
template<class T>class SegmentTree_Delayed{
	vector<T> seg;
	vector<T> memo;
	public:
	int size; //size of segmenttree
	T init;
	SegmentTree_Delayed (int _legth,T _init=0){
		size=1;
		init=_init;
		while(size <=_legth){
			size<<=1;
		}
		seg.assign(size<<1,init);
		memo.assign(size << 1, init);
	} 
	T get(int index){
		return seg[size+index];
	}
	void show(){
		rep(i,size*2){
			 //clog<<seg[i]<<" ";
		}
		 //clog<<endl;
		rep(i, size * 2)
		{
			 //clog << memo[i] << " ";
		}
	 //clog<<endl;
	}
	//change value 
	void update(int index, T value){
		seg[size+index]=value;
		int ter=index+size;
		while(ter!=1){
			ter/=2;
			seg[ter]=upquary(ter*2);
		} show();
	}
	void write(int l, int r,T value){
		/*
		memoのindexStart-indexStop間にvalueを書き換える
		書き換えは要素のアクセス時に行う
		*/
		writequary(l, r, 1, 0, size,value);
		 //show()();
	}

	void writequary(int left, int right, int index, int atStart, int atStop,T value)
	{
		 //clog << "index: " << index << " Start: " << atStart << " stop: " << atStop << ":: ";
		if ((left <= atStart) and (atStop-1 <= right))
		{ //対象範囲に完全に囲まれる
			 //clog << " compleatety ; " << seg[index] << endl;
			memo[index]=value;
			return ;
		}
		if ((atStop <= left) or (right < atStart))
		{ //対象範囲に全く関わらない
			 //clog << " ignore ; " << init << endl;
			return ;
		}
		if (index >= size)
		{ //範囲外
			 //clog << " out of range/finary ; " << seg[index] << endl;
			memo[index]=value;
			return ;
		}
		 //clog << " partitical" << endl;
		//対象範囲に一部が含まれる
		load(index*2);
		load(index*2+1);
		writequary(left, right, index * 2, atStart, atStart + (atStop - atStart) / 2,value);
		writequary(left, right, index * 2 + 1, atStart + (atStop - atStart) / 2, atStop,value);
		return ;
	}

	//-------------------//
	T findquary(int left,int right,int index,int atStart,int atStop){
		load(index);
		 //show()();
		 //clog<<"index: "<<index<<" Start: "<<atStart<<" stop: "<<atStop<<":: ";
		if ((left <= atStart) and (atStop <= right)){//対象範囲に完全に囲まれる
			 //clog<<" compleatety ; "<<seg[index]<<endl;
			return seg[index];
		}if((atStop <= left) or ( right < atStart)){//対象範囲に全く関わらない
			 //clog<<" ignore ; "<<init<<endl;
			return init;
		}if (index >= size){//範囲外
		 //clog<<" out of range/finary ; "<<seg[index]<<endl;
			return seg[index];
		}
		 //clog<<" partitical"<<endl;
		//対象範囲に一部が含まれる
		T aL=findquary(left, right, index * 2, atStart, atStart + (atStop - atStart) / 2);
		T aR= findquary(left, right, index * 2 +1,  atStart +(atStop - atStart) / 2, atStop);
		return min(aL,aR);
	}
	void load(int index){
		if(memo[index]==init){
			return ;
		}
		seg[index] = memo[index];

		if (not (index >= size))
		{
			memo[index*2]=memo[index];

			memo[index*2+1]=memo[index];
		}
		memo[index] = init;
	}
	T upquary(int index){ //q1
		return min(seg[index],seg[index+1]);
	}
	T find(int l, int r){ //q2
		T res = seg[size + l];
		 //clog<<"left: "<<l<<" right "<<r<<endl;
		res = findquary(l, r,1,0, size);
		return res;
	}
};

int main(){
	int n,q;
	int ans=0;
	cin >>n>>q;
	SegmentTree_Delayed<int> a(n,-1LL+(1LL<<31));
	int id,x,y,z;
	rep(i,q){
		cin>>id>>x;
		
		if(id==0){
			cin>>y>>z;
			a.write(x,y,z);
		}else{
			cout<<a.find(x,x)<<endl;;
		}
	}
	//cout<<ans<<endl;
}


Measured memory_bytes: 4948