// clang-format off
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979;
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
bool odd(const int &n) { return n & 1; }
bool even(const int &n) { return ~n & 1; }
template<typename T = int> T in() { T x; cin >> x; return x; }
template<typename T = int> T in(T &&x) { T z(forward<T>(x)); cin >> z; return z; }
template<typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &x : v) is >> x; return is; }
template<typename A, typename B> istream &operator>>(istream &is, pair<A, B> &p) { return is >> p.first >> p.second; }
template<typename T> ostream &operator<<(ostream &os, const vector<vector<T>> &v) { int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "" : "\n"); return os; }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "" : " "); return os; }
template<typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p) { return os << p.first << ' ' << p.second; }
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
// clang-format on

template<typename Monoid> class RangeActionSegTree {
  using T = typename Monoid::value_type;

  Monoid m;
  vector<T> tree; // 1-indexed
  int size = 1;

  void push(int x) {
    if (x <= 1) return;
    push(x /= 2);
    tree[x * 2] = m(tree[x * 2], tree[x]);
    tree[x * 2 + 1] = m(tree[x * 2 + 1], tree[x]);
    tree[x] = m.id();
  }

public:
  RangeActionSegTree(const int &n = 0) {
    while (size < n) size *= 2;
    tree.assign(size * 2, m.id());
  }

  RangeActionSegTree(const int &n, const T &x) {
    while (size < n) size *= 2;
    tree.assign(size * 2, m.id());
    fill(tree.begin() + size, tree.end(), x);
  }

  template<typename InputIterator> RangeActionSegTree(InputIterator first, InputIterator last) {
    int n = distance(first, last);
    while (size < n) size *= 2;
    tree.resize(size * 2, m.id());
    copy(first, last, tree.begin() + size);
  }

  void act(int l, int r, const T &x) { // [l, r) += x
    for (push(l += size), push((r += size) - 1); l < r; l /= 2, r /= 2) {
      if (l & 1) tree[l] = m(tree[l], x), l++;
      if (r & 1) r--, tree[r] = m(tree[r], x);
    }
  }

  T operator[](int i) {
    T acc = tree[i += size];
    while (i /= 2) acc = m(acc, tree[i]);
    return acc;
  }
};

template<typename T> class RangeUpdateSegTree {
  struct updateMonoid {
    using value_type = pair<bool, T>;
    value_type id() { return {false, T()}; }
    value_type operator()(const value_type &a, const value_type &b) { return b.first ? b : a; }
  };
  RangeActionSegTree<updateMonoid> rast;

public:
  RangeUpdateSegTree(const int &n = 0) : rast(n) {}
  RangeUpdateSegTree(const int &n, const T &x) : rast(n, {true, x}) {}
  template<typename InputIterator> RangeUpdateSegTree(InputIterator first, InputIterator last) : rast(first, last) {}
  void update(const int &l, const int &r, const T &x) { rast.act(l, r, {true, x}); }
  T operator[](const int &i) { return rast[i].second; }
};

main {
  int n, q;
  cin >> n >> q;
  RangeUpdateSegTree<int> rust(n, 2147483647);
  while (q--) {
    if (in()) {
      int i;
      cin >> i;
      cout << rust[i] << endl;
    } else {
      int s, t, x;
      cin >> s >> t >> x;
      rust.update(s, t + 1, x);
    }
  }
}



Measured memory_bytes: 7060