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.
n, q = map(int, input().split())
a = list(map(int, input().split()))


otr_size = max(1, int(n ** 0.5))
otr_cnt = (n + otr_size - 1) // otr_size

def get_otr_boundaries(i):
    return (i * otr_size, min(n, (i + 1) * otr_size))

def get_otr_by_index(i):
    return i // otr_size

otr_delta = [0] * otr_cnt
otr_dict = [{} for i in range(otr_cnt)]

for i in range(n):
    otr_dict[get_otr_by_index(i)][a[i]] = otr_dict[get_otr_by_index(i)].get(a[i], 0) + 1


def change_item(i, otr_index, x):
    otr_dict[otr_index][a[i]] -= 1
    a[i] += x
    otr_dict[otr_index][a[i]] = otr_dict[otr_index].get(a[i], 0) + 1

def get_item(i, otr_index):
    return a[i] + otr_delta[otr_index]

def has_item(val, otr_index):
    return otr_dict[otr_index].get(val - otr_delta[otr_index])
    
for q_num in range(q):
    query = list(map(int, input().split()))
    if query[0] == 1:
        l, r, x = query[1:]
        l -= 1
        r -= 1
        l_otr = get_otr_by_index(l)
        r_otr = get_otr_by_index(r)
        if l_otr == r_otr:
            for i in range(l, r + 1):
                change_item(i, l_otr, x)
        else:
            gr1 = get_otr_boundaries(l_otr)[1]
            gr2 = get_otr_boundaries(r_otr)[0]
            for i in range(l, gr1):
                change_item(i, l_otr, x)

            for i in range(gr2, r + 1):
                change_item(gr2, r_otr, x)

            for i in range(l_otr + 1, r_otr):
                otr_delta[i] += x

    else:
        y = query[1]
        first = 0
        while first < otr_cnt and not has_item(y, first):
            first += 1
        if first == otr_cnt:
            print(-1)
        else:
            second = otr_cnt - 1
            while not has_item(y, second):
                second -= 1

            for ind_first in range(*get_otr_boundaries(first)):
                if get_item(ind_first, first) == y:
                    break

            for ind_second in reversed(range(*get_otr_boundaries(second))):
                if get_item(ind_second, second) == y:
                    break
            print(ind_second - ind_first)
