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 <iostream>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
typedef long long lli;
typedef vector<lli> vll;
typedef vector<bool> vbl;
typedef vector<vector<lli> > mat;
typedef vector<vector<bool> > matb;
typedef vector<string> vst;
typedef pair<lli,lli> pll;
typedef pair<double,double> pdd;

template<class T>
class sg_tree : public vector<T>{
private:
    lli n;
    T default_value;
    void _query(lli a,lli b,T x,lli k,lli l,lli r){
        if(r <= a || b <= l) return;
        if(a <= l && r <= b) (*this)[k] = x;
        else {
            _query(a,b,x,k*2+1,l,(l+r)/2);
            _query(a,b,x,k*2+2,(l+r)/2,r);
            return;
        }
    }
public:
    sg_tree():vector<T>(){

    }
    sg_tree(lli n,T d = -1):vector<T>(n*4,d){
		this->n = 1;
        while(n > this->n) this->n <<= 1;
        this->default_value = d;
    }
    T update(lli i){
        i += n - 1;
        T ret = (*this)[i];
        while(i > 0){
            i = (i - 1) / 2;
            ret = max(ret,(*this)[i]);
        }
        return ret;
    }
    void query(lli a,lli b,lli x){
        _query(a,b,x,0,0,n);
    }
    T func(T a,T b){
        return min(a,b);
    }
};

lli n,q;
lli c,s,t,x;
lli k = 0;
vll b;

sg_tree<lli> sg;

int main(){
    cin >> n >> q;
    sg = sg_tree<lli> (n);
    for(lli i = 0;i < q;i++){
        cin >> c;
        if(c){
            cin >> x;
            lli t;
            if((t = sg.update(x)) < 0) cout << 2147483647 << endl;
            else cout << b[t] << endl;
        }else{
            cin >> s >> t >> x;
            b.push_back(x);
            sg.query(s,t+1,k);
            k++;
            
        }
    }
}