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
#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct range_update_point_value{
	int N;
	vector<pair<T, int>> ST;
	int t;
	range_update_point_value(int n){
		N = 1;
		while (N < n){
			N *= 2;
		}
		ST = vector<pair<T, int>>(N * 2 - 1, make_pair(0, 0));
		t = 1;
	}
	range_update_point_value(int n, T x){
		N = 1;
		while (N < n){
			N *= 2;
		}
		ST = vector<pair<T, int>>(N * 2 - 1, make_pair(0, 0));
		for (int i = 0; i < n; i++){
			ST[N - 1 + i] = make_pair(x, 1);
		}
		t = 2;
	}
	range_update_point_value(vector<T> A){
		int n = A.size();
		N = 1;
		while (N < n){
			N *= 2;
		}
		ST = vector<pair<T, int>>(N * 2 - 1, make_pair(0, 0));
		for (int i = 0; i < n; i++){
			ST[N - 1 + i] = make_pair(A[i], 1);
		}
		t = 2;
	}
	T operator [](int k){
		k += N - 1;
		T ans = ST[k].first;
		T time = ST[k].second;
		while (k > 0){
			k = (k - 1) / 2;
			if (ST[k].second > time){
				ans = ST[k].first;
				time = ST[k].second;
			}
		}
		return ans;
	}
	void update(int L, int R, T x, int i, int l, int r){
		if (R <= l || r <= L){
			return;
		} else if (L <= l && r <= R){
			ST[i] = make_pair(x, t);
		} else {
			int m = (l + r) / 2;
			update(L, R, x, i * 2 + 1, l, m);
			update(L, R, x, i * 2 + 2, m, r);
		}
	}
	void range_update(int L, int R, T x){
		update(L, R, x, 0, 0, N);
		t++;
	}
};
int main(){
  int n, q;
  cin >> n >> q;
  range_update_point_value<int> a(n, 2147483647);
  for (int c = 0; c < q; c++){
    int T;
    cin >> T;
    if (T == 0){
      int s, t, x;
      cin >> s >> t >> x;
      a.range_update(s, t + 1, x);
    }
    if (T == 1){
      int i;
      cin >> i;
      cout << a[i] << endl;
    }
  }
}
