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.
from collections import defaultdict


SQRT = 800
#Unrolled Linked List
class sqrt_table():

    def __init__(self, numbers):
        self.numbers = numbers
        self.N = len(numbers)
        self.SQRT = int(self.N / SQRT) + 1

        self.add_tag = [0 for i in range(SQRT)]
        self.groups = [defaultdict(int) for i in range(SQRT)]
        self.belong_group = [0 for i in range(self.N)]

        for (i, num) in enumerate(self.numbers):
            group = int(i/SQRT)
            self.belong_group[i] = group
            self.groups[group][num] += 1

    def gao(self, l, r, v):
        group = self.belong_group[l]
        for i in range(l, r):
            num = self.numbers[i]
            self.groups[group][num] -= 1
            self.groups[group][num+v] += 1
            self.numbers[i] += v

    def addv(self, l, r, v):
        lgroup = self.belong_group[l]
        rgroup = self.belong_group[r]
        
        if lgroup == rgroup:
            self.gao(l, r+1, v)
            return

        self.gao(l, (lgroup+1)*SQRT)
        self.gao(rgroup*SQRT, r+1)
        
        for i in range(lgroup+1, rgroup):
            self.add_tag[i] += v

    def search_low(self, v):
        for i in range(self.SQRT):
            target = v - self.add_tag[i]
            if self.groups[i][target] > 0:
                low  = i*SQRT
                high = min((i+1)*SQRT, self.N)
                for j in range(low, high):
                    if self.numbers[j] == target:
                        return j
        return -1

    def search_high(self, v):
        for i in range(self.SQRT-1, -1, -1):
            target = v - self.add_tag[i]
            if self.groups[i][target] > 0:
                low  = i*SQRT
                high = min((i+1)*SQRT, self.N)
                for j in range(high-1, low-1, -1):
                    if self.numbers[j] == target:
                        return j
        return -2

    def print_info(self):
        print(self.numbers)
        print(self.groups[0])

N, Q = map(int, input().split())
Ns = list(map(int, input().split()))
ST = sqrt_table(Ns)

for qs in range(Q):
    query = list(map(int, input().split()))
    if query[0] == 1:
        tmp, l, r, v = query
        ST.addv(l-1, r-1, v)
    if query[0] == 2:
        v = query[1]
        low = ST.search_low(v)
        high = ST.search_high(v)
        print(high-low)
