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;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pairInt;
typedef tuple<int, int, int> tuple3Int;
#define FOR(i, n) for (int i = 0; i < int(n); i++)
#define FOR1(i, m, n) for (int i = int(m); i < int(n); i++)
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
#define MIN(a, b) ((a) <= (b) ? (a) : (b))

ll pow(ll base, uint exp) {
  if (exp == 0)
    return 1;

  if (exp % 2 == 0) {
    return pow(base * base, exp / 2);
  } else {
    return base * pow(base * base, exp / 2);
  }
}

class SegTree {
private:
  int num;
  int exp;
  int seq;
  vector<pair<int, ll>> vec;

public:
  SegTree(int n) : num(n), seq(0){
    exp = 0;
    int x = 1;
    while (x < n) {
      exp ++;
      x <<= 1;
    }

    vec.resize(2 * pow(2, exp) - 1, make_pair(-1, pow(2, 31) - 1));
  }

  void update(int s, int t, ll x) {
    _update(s, t, x, 0, 0, pow(2, exp) - 1);
    seq ++;
  }

  ll get(int i) {
    return _get(i, 0, 0, pow(2, exp) - 1).second;
  }

private:
  void _update(int s, int t, ll x, int index, int from, int to) {
    if (s <= from && to <= t) {
      vec[index].first = seq;
      vec[index].second = x;
    } else {
      if (s <= (from + to) / 2)
        _update(s, t, x, 2 * index + 1, from, (from + to) / 2);

      if ((from + to) / 2 < t)
        _update(s, t, x, 2 * index + 2, (from + to) / 2 + 1, to);
    }
  }

  pair<int, ll> _get(int i, int index, int from, int to) {
    pair<int, ll> p;
    if (from == to) {
      return vec[index];
    }

    if (i <= (from + to) / 2)
      p = _get(i, 2 * index + 1, from, (from + to) / 2);
    else
      p = _get(i, 2 * index + 2, (from + to) / 2 + 1, to);

    if (p.first < vec[index].first)
      return vec[index];
    else
      return p;
  }

};

int main(int argc, char *argv[])
{
  int n, q;

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

  SegTree st(n);

  FOR(i, q) {
    int a;
    scanf("%d", &a);

    if (a == 0) {
      int s, t, x;
      scanf("%d%d%d", &s, &t, &x);
      st.update(s, t, x);
    } else {
      int b;
      scanf("%d", &b);
      printf("%lld\n", st.get(b));
    }
  }
  
  return 0;
}