Professor GukiZ was playing with arrays again and accidentally discovered new function, which he called *GukiZiana*. For given array *a*, indexed with integers from 1 to *n*, and number *y*, *GukiZiana*(*a*, *y*) represents maximum value of *j* - *i*, such that *a*<sub class="lower-index">*j*</sub> = *a*<sub class="lower-index">*i*</sub> = *y*. If there is no *y* as an element in *a*, then *GukiZiana*(*a*, *y*) is equal to  - 1. GukiZ also prepared a problem for you. This time, you have two types of queries: 
 1.  First type has form 1 *l* *r* *x* and asks you to increase values of all *a*<sub class="lower-index">*i*</sub> such that *l* ≤ *i* ≤ *r* by the non-negative integer *x*. 1.  Second type has form 2 *y* and asks you to find value of *GukiZiana*(*a*, *y*). 
For each query of type 2, print the answer and make GukiZ happy!
The first line contains two integers *n*, *q* (1 ≤ *n* ≤ 5 * 10<sup class="upper-index">5</sup>, 1 ≤ *q* ≤ 5 * 10<sup class="upper-index">4</sup>), size of array *a*, and the number of queries. 

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ... *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), forming an array *a*. 

Each of next *q* lines contain either four or two numbers, as described in statement:

If line starts with 1, then the query looks like 1 *l* *r* *x* (1 ≤ *l* ≤ *r* ≤ *n*, 0 ≤ *x* ≤ 10<sup class="upper-index">9</sup>), first type query.

If line starts with 2, then th query looks like 2 *y* (1 ≤ *y* ≤ 10<sup class="upper-index">9</sup>), second type query.
/**
 *  “Experience is the name everyone gives to their mistakes.” – Oscar Wilde
 *
 *  author  :   prodipdatta7
 *  created :   Monday 20-April, 2020  07:17:38 PM
**/

//#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <deque>
#include <iterator>
#include <bitset>
#include <assert.h>
#include <new>
#include <sstream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
// #pragma GCC optimize("unroll-loops")

using namespace std ;
using namespace __gnu_pbds ;

#define     ll          long long
#define     ld          long double
#define     ull         unsigned long long
#define     pii         pair<int,int>
#define     pll         pair<ll,ll>
#define     vi          vector<int>
#define     vll         vector<ll>
#define     vvi         vector<vector<int>>
#define     debug(x)    cerr << #x << " = " << x << '\n' ;
#define     rep(i,b,e)  for(__typeof(e) i = (b) ; i != (e + 1) - 2 * ((b) > (e))  ; i += 1 - 2 * ((b) > (e)))
#define     all(x)      x.begin() , x.end()
#define     rall(x)     x.rbegin() , x.rend()
#define     sz(x)       (int)x.size()
#define     ff          first
#define     ss          second
#define     pb          push_back
#define     eb          emplace_back
#define     mem(a)      memset(a , 0 ,sizeof a)
#define     memn(a)     memset(a , -1 ,sizeof a)
#define     fread       freopen("input.txt","r",stdin)
#define     fwrite      freopen("output.txt","w",stdout)
#define     TN          typename

typedef tree <int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_set;
typedef tree <int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_multiset;

/*
Note :  There is a problem with erase() function in ordered_multiset (for less_equal<int> tag).
        lower_bound() works as upper_bound() and vice-versa.
        Be careful to use.
        i) find_by_order(k) : kth smallest element counting from 0 .
        ii) order_of_key(k) : number of elements strictly smaller than k.
*/

/*###############-> Input Section <-###############*/

template <TN T> inline void Int(T &a) {
    bool minus = false; a = 0; char ch = getchar();
    while (true) { if (ch == '-' or (ch >= '0' && ch <= '9')) break; ch = getchar(); }
    if (ch == '-') minus = true; else a = ch - '0';
    while (true) { ch = getchar(); if (ch < '0' || ch > '9') break; a = a * 10 + (ch - '0'); }
    if (minus)a *= -1 ;
}
template < TN T, TN T1 > inline void Int(T &a, T1 &b) {Int(a), Int(b) ;}
template < TN T, TN T1, TN T2 > inline void Int(T &a, T1 &b, T2 &c) {Int(a, b), Int(c) ;}
template < TN T, TN T1, TN T2, TN T3 > inline void Int(T &a, T1 &b, T2 &c, T3 &d) {Int(a, b), Int(c, d) ;}
template < TN T, TN T1, TN T2, TN T3, TN T4> inline void Int(T &a, T1 &b, T2 &c, T3 &d, T4 &e) {Int(a, b), Int(c, d, e) ;}

/*###############-> Debugger <-###############*/

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {cout << endl ;}
template<TN T, TN... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << ' ' ;
    err(++it, args...);
}

template<class ValueType>
bool unstable_remove(
    typename std::vector<ValueType>& container,
    typename std::vector<ValueType>::iterator it
) {
    auto lastEl = container.end() - 1;
    if (it != lastEl) {
        *it = std::move(*lastEl);
    }
    container.pop_back();
}

/******************************************
#Rows are numbered from top to bottom.
#Columns are numbered from left to right.
Moves : L, U, R, D, LU, RU, RD, LD.
******************************************/
int dx[8] = {0, -1, 0, 1, -1, -1, 1, 1} ;
int dy[8] = { -1, 0, 1, 0, -1, 1, 1, -1} ;

/*###############-> Constraints <-###############*/

const int N          = (int)5e5 + 5 ;
const int maxN       = (int)1e6 + 6 ;
const ll  Mod        = (ll)1e9 + 7 ;
const int inf        = (int)2e9 ;
const ll  Inf        = (ll)1e18 ;
const int mod        = (int)1e9 + 7 ;


inline int add(int a, int b, int mod) {a += b ; return a >= mod ? a - mod : a ;}
inline int sub(int a, int b, int mod) {a -= b ; return a < 0 ? a + mod : a ;}
inline int mul(int a, int b, int mod) {return (ll)a * b % mod ;}

/*...... ! Code starts from here ! ......*/

const int blockSize = 3082 ; // sqrt(NlogN)

int lazy[165], block, n, q ; 
vector < pii > box[165], a ;

struct Radix_Sort {
    /* Non-decreasing order*/

    int getMax(vector < pii > & a) {
        int mx = a[0].ff ;
        for (int i = 1 ; i < n ; ++i) {
            if (a[i].ff > mx)
                mx = a[i].ff ;
        }
        return mx ;
    }

    void Counting_Sort(vector < pii > & a, int exp) {
        vector < int > cnt(10, 0) ;
        vector < pii > sorted(n) ;
        for (int i = 0 ; i < n ; ++i) {
            cnt[(a[i].ff / exp) % 10]++ ;
        }
        for (int i = 1 ; i < 10 ; ++i)
            cnt[i] += cnt[i - 1] ;
        for (int i = n - 1 ; i >= 0 ; --i) {
            int pos = (a[i].ff / exp) % 10 ;
            sorted[cnt[pos] - 1] = a[i] ;
            cnt[pos]-- ;
        }
        for (int i = 0 ; i < n ; ++i)
            a[i] = sorted[i] ;
    }

    void solve(vector < pii > & a) {
        int mx = getMax(a) ;
        for (int i = 1 ; mx / i > 0 ; i *= 10) {
            Counting_Sort(a, i) ;
        }

    }

} var;


void update(int l, int r, int v, int n) {
    int st = l / blockSize, en = r / blockSize ;
    if (st == en) {
        for (int i = l ; i <= r ; ++i)
            a[i].ff += v ;
        for (int i = st * blockSize, j = 0 ; i < min(n, (st + 1) * blockSize) ; ++i, j++) {
            box[st][j] = a[i] ;
        }
        var.solve(box[st]) ;
    }
    else {
        for (int i = l ; i < (st + 1) * blockSize ; ++i)
            a[i].ff += v ;
        for (int i = st * blockSize, j = 0 ; i < min(n, (st + 1) * blockSize) ; ++i, j++) {
            box[st][j] = a[i] ;
        }
        var.solve(box[st]) ;
        for (int i = st + 1 ; i < en ; ++i)
            lazy[i] += v ;
        for (int i = en * blockSize ; i <= r ; ++i)
            a[i].ff += v ;
        for (int i = en * blockSize, j = 0 ; i <= r ; ++i, j++) {
            box[en][j] = a[i] ;
        }
        var.solve(box[en]) ;
    }
}

int query(int x){
    int res = -1 ; 
    for(int i = 0 ; i < block ; ++i){
        int v = x - lazy[i] ; 
        pii L = make_pair(v, 0), R = make_pair(v, n) ; 
        int l = lower_bound(all(box[i]), L) - box[i].begin() ; 
        if(l == sz(box[i]) or box[i][l].ff != v)continue ; 
        int r = upper_bound(all(box[i]), R) - box[i].begin() ;
        --r ; 
        int df = box[i][r].ss - box[i][l].ss ; 
        if(res < df)res = df ; 
    }
    return res ; 
}


int main() {
// #ifndef ONLINE_JUDGE
//  fwrite ;
// #endif
    // ios_base::sync_with_stdio(false) ;
    // cin.tie(NULL) ; cout.tie(NULL) ;
    int test = 1 , tc = 0 ;
    //Int(test) ;
    while (test--) {
        Int(n, q) ;
        for(int i = 0 ; i < n ; ++i){
            int x ; Int(x) ; 
            a.pb(make_pair(x, i)) ;
        }
        for(int i = 0 ; i < n ; ++i){
            box[i / blockSize].pb(a[i]) ; 
        }
        block = (n + blockSize - 1) / blockSize ;
        for(int i = 0 ; i < block ; ++i){
            var.solve(box[i]) ; 
        }
        int tp, l, r, v ; 
        while(q--){
            Int(tp) ; 
            if(tp == 1){
                Int(l, r, v) ; 
                update(l - 1, r - 1, v, n) ; 
            }
            else {
                Int(v) ; 
                int res = query(v) ; 
                printf("%d\n",res);
            }
        }
    }
    return 0 ;
}