Write a program which manipulates a sequence A = {a0, a1, . . . , an−1} with the following operations:

* update(s, t, x): change as, as+1, ..., at to x.
* find(i): output the value of ai.



Note that the initial values of ai (i = 0, 1, . . . , n−1) are 231-1.

Constraints

* 1 ≤ n ≤ 100000
* 1 ≤ q ≤ 100000
* 0 ≤ s ≤ t < n
* 0 ≤ i < n
* 0 ≤ x < 231−1

Input


n q
query1
query2
:
queryq


In the first line, n (the number of elements in A) and q (the number of queries) are given. Then, ith query queryi is given in the following format:


0 s t x


or


1 i


The first digit represents the type of the query. '0' denotes update(s, t, x) and '1' denotes find(i).

Output

For each find operation, print the value.

Examples

Input

3 5
0 0 1 1
0 1 2 3
0 2 2 2
1 0
1 1


Output

1
3


Input

1 3
1 0
0 0 0 5
1 0


Output

2147483647
5


import java.util.Scanner;

public class Main {
	private static final int INF = Integer.MAX_VALUE;
	static int n = 1;
	static int[] D;
	static int[] M;
	static int[] arr;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n1 = sc.nextInt();
		int op_num = sc.nextInt();
		String[] op = new String[op_num+1];
		for(int i=0;i<op.length;i++)
			op[i]=sc.nextLine();
		
		init(n1);
		arr = new int[op_num];
		
		for(int i=1,mark=0,i1=0;i<=op_num;i++) {
			String[] Split = op[i].split(" ");
			int x,y,z;
			if(Integer.parseInt(Split[0]) == 0) {
				x = Integer.parseInt(Split[1]);
				y = Integer.parseInt(Split[2]);
				z = Integer.parseInt(Split[3]);
				arr[i1] = z;
				update(x,y+1,0,0,n,mark);
			}else {
				x = Integer.parseInt(Split[1]);
				int result = find(x+n-1,n);
				System.out.println(result);
			}
			i1++;
			mark++;
		}
		
		
		/*System.out.println("M[]:");
		for(int i=0;i<M.length;i++)
			System.out.print(M[i]+" ");
		System.out.println(n);
		System.out.println("arr[]:");
		for(int i=0;i<arr.length;i++)
			System.out.print(arr[i]+" ");*/
		
		
	}

	private static int find(int n1, int n2) {
		// TODO Auto-generated method stub
		int max = n1;
		for(int i=0;n1>0;i++) {
			n1 = (n1-1)/2;
			if(M[max]<M[n1])
				max = n1;
		}
		int temp;
		if(M[max] == -1)
			temp = INF;
		else
			temp = arr[M[max]];
		
		return temp;
	}

	public static void update(int a, int b, int k, int l, int r, int mark) {
		// TODO Auto-generated method stub
		/*if(r<=a||b<=l)
			return;
		if(a<=l && r<=b) {
			M[k] = mark;
			return;
		}*/
		if(r<=a || b<=l)
			return;
		if(a<=l && r<=b) {
			M[k] = mark;
			return;
		}
		update(a,b,2*k+1,l,(l+r)/2,mark);
		update(a,b,2*k+2,(l+r)/2,r,mark);
	}

	public static void init(int N) {
		// TODO Auto-generated method stub
		n = 1;
		while(n<N)
			n*=2;
		D = new int[n*2-1];
		M = new int[n*2-1];
		for(int i=0;i<n*2-1;i++) {
			D[i] = INF;
			M[i] = -1;
		}
	}

}

