using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using static System.Console;
using static System.Math;

class Program
{
    static void Main()
    {
        SetOut(new System.IO.StreamWriter(OpenStandardOutput()) { AutoFlush = false });
        var N = FastIO.Int();
        var Q = FastIO.Int();
        var d = new Dual<int>(N, (l, r) => r == int.MaxValue ? l : r, int.MaxValue);
        for (int i = 0; i < Q; i++)
        {
            if (FastIO.Int() == 0)
            {
                var s = FastIO.Int();
                var t = FastIO.Int() + 1;
                var x = FastIO.Int();
                d.Update(s, t, x);
            }
            else
            {
                var t = FastIO.Int();
                WriteLine(d.Query(t));
            }
        }
        Out.Flush();
    }
}

public class Dual<E>
    {
        E[] lazy;
        Func<E, E, E> H;
        E EI;
        int N;
        public int Length => N;
        int height;

        public Dual(int length, Func<E, E, E> h, E ei)
        {
            N = length;
            height = 1;//!log2
            while (1 << height < length) height++;

            lazy = new E[N * 2];
            for (int i = 0; i < lazy.Length; i++) lazy[i] = ei;//i=1でもいいけど伝播でlazy[0]にアクセスしない保証がいる

            EI = ei;
            H = h;
        }

        void Propagate(int k)
        {
            //if (lazy[k] == EI) return;//定数倍高速化（書けない）
            lazy[k * 2 + 0] = H(lazy[k * 2 + 0], lazy[k]);
            lazy[k * 2 + 1] = H(lazy[k * 2 + 1], lazy[k]);
            lazy[k] = EI;
        }

        void Thrust(int k)
        {
            for (int i = height; i > 0; i--) Propagate(k >> i);
        }

        public void Update(int l, int r, E v)
        {
            l += N;
            r += N;
            Thrust(l);
            Thrust(r - 1);
            while (l < r)
            {
                if ((l & 1) == 1)
                {
                    lazy[l] = H(lazy[l], v);
                    l++;
                }
                if ((r & 1) == 1)
                {
                    --r;
                    lazy[r] = H(lazy[r], v);
                }
                l >>= 1;
                r >>= 1;
            }
        }
        //配列初期化は？Update(k, v)とか書く？インデクサは欲しいか　双対でにぶたんは意味ない？
        public E Query(int i)
        {
            i += N;
            Thrust(i);
            return lazy[i];
        }
    }
public static class FastIO
{
    static System.IO.Stream str = System.Console.OpenStandardInput();
    const int size = 1024;
    static byte[] buffer = new byte[size];
    static int ptr;
    static int len;

    static byte Read()
    {
        if (ptr == len)
        {
            len = str.Read(buffer, 0, size);
            if (len == 0) return 0;
            ptr = 0;
        }
        return buffer[ptr++];
    }

    public static int Int()
    {
        var c = Read();
        while (c < 0x21)
        {
            c = Read();
        }
        var n = false;
        if (c == '-')
        {
            n = true;
            c = Read();
        }
        var ret = 0;
        while (c > 0x20)
        {
            ret = ret * 10 + c - '0';
            c = Read();
        }
        return n ? -ret : ret;
    }

    public static long Long()
    {
        var c = Read();
        while (c < 0x21)
        {
            c = Read();
        }
        var n = false;
        if (c == '-')
        {
            n = true;
            c = Read();
        }
        var ret = 0L;
        while (c > 0x20)
        {
            ret = ret * 10 + c - '0';
            c = Read();
        }
        return n ? -ret : ret;
    }
}



Measured memory_bytes: 19772