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.
import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

n, q = map(int, input().split())
a = list(map(int, input().split()))
m = 555
m0 = n // m + min(n % m, 1)
s = [set() for _ in range(m0)]
for i in range(m0):
    for j in range(i * m, min((i + 1) * m, n)):
        s[i].add(a[j])
lazy = [0] * m0
ans = []
inf = pow(10, 9) + 1
for _ in range(q):
    t = list(map(int, input().split()))
    if t[0] == 1:
        l, r, x = t[1:]
        l, r = l - 1, r - 1
        l0, r0 = l // m, r // m
        if l0 == r0:
            u, v = lazy[l0] + x, lazy[l0]
            for i in range(l0 * m, min((l0 + 1) * m, n)):
                a[i] += u if l <= i <= r else v
            lazy[l0] = 0
            s[l0] = set([a[i] for i in range(l0 * m, min((l0 + 1) * m, n))])
            continue
        for j in [l0, r0]:
            u, v = lazy[j] + x, lazy[j]
            for i in range(j * m, min((j + 1) * m, n)):
                a[i] += u if l <= i <= r else v
            lazy[j] = 0
            s[j] = set([a[i] for i in range(j * m, min((j + 1) * m, n))])
        for i in range(l0 + 1, r0):
            lazy[i] += x
    else:
        y = t[1]
        l = -1
        for i in range(m0):
            if y - lazy[i] in s[i]:
                l = i
                break
        if l == -1:
            ans0 = -1
            ans.append(ans0)
            continue
        for i in range(m0 - 1, -1, -1):
            if y - lazy[i] in s[i]:
                r = i
                break
        mi, ma = inf, -inf
        for i in set([l, r]):
            for j in range(i * m, min((i + 1) * m, n)):
                if a[j] == y - lazy[i]:
                    mi, ma = min(mi, j), max(ma, j)
        ans0 = ma - mi
        ans.append(ans0)
sys.stdout.write("\n".join(map(str, ans)))