#include<stdio.h>
#define MAX 100000


int main(){
int n,i,q,j;
int A[MAX];
int com,s,t,x;

scanf("%d %d",&n,&q);

for(i=0;i<n;i++)A[i]=2147483647;


for(i=0;i<q;i++){
 scanf("%d",&com);
 switch(com){
  case 0:scanf("%d %d %d",&s,&t,&x);
         for(j=s;j<=t;j++){A[j]=x;}
         break;

  case 1:scanf("%d",&x);
         printf("%d\n",A[x]);
         break;
 }
}

return 0;
}
