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 functools import cmp_to_key
import math

class Node(object):
    def __init__(self):
        self.num = 0
        self.loc = 0

inputt = [Node() for i in range(500005)]

rangee = [[0, 0] for i in range(5005)]

delta = [0 for i in range(5005)]

pr = 0

def comp(x : Node, y : Node):
    if x.num == y.num:
        return x.loc - y.loc
    return x.num - y.num

def query(Y):
    global inputt, rangee, pr
    a = -1
    for i in range(1, pr+1):
        L, R = rangee[i]
        yy = Y - delta[i]
        while L <= R:
            mid = (L+R) >> 1
            if inputt[mid].num >= yy:
                R = mid - 1
            else:
                L = mid + 1
        if inputt[L].num == yy:
            a = inputt[L].loc
            break

    if a == -1:
        return a
    
    for i in range(pr, 0, -1):
        L, R = rangee[i]
        yy = Y - delta[i]
        while L <= R:
            mid = (L + R) >> 1
            if inputt[mid].num <= yy:
                L = mid + 1
            else:
                R = mid - 1    
        if inputt[R].num == yy:
            return inputt[R].loc - a


def modify(a, b, c):
    global inputt, rangee, pr

    for i in range(1, pr + 1):
        if a <= rangee[i][0] and b >= rangee[i][1]:
            delta[i] += c
            continue

        if a > rangee[i][1] or b < rangee[i][0]:
            continue
        
        for j in range(rangee[i][0], rangee[i][1]+1, 1):
            if a <= inputt[j].loc and inputt[j].loc <= b:
                inputt[j].num += c
        
        inputt = inputt[:rangee[i][0]] + sorted(inputt[rangee[i][0]:rangee[i][1]+1], key=cmp_to_key(comp)) + inputt[rangee[i][1] + 1 :]


def main():
    global inputt, rangee, pr
    pr = 0
    n, q = list (map (int, input().split()))
    readline = input().split()

    for i in range(1, n + 1) :
        inputt[i].num = int (readline[i - 1])
        inputt[i].loc = i
    
    
    s = 1 + int (math.sqrt(n))

    i = 1
    while i <= n :
        endd = n + 1 if i + s > n else i + s
        inputt = inputt[:i] + sorted(inputt[i : endd], key=cmp_to_key(comp)) + inputt[endd:]
        pr += 1
        rangee[pr] = i, endd - 1
        i += s

    for case in range (q) :
        readline = input().split()
        c = readline[0]
        if c == 'O' or c == '1':
            a, b, c = int (readline[1]), int (readline[2]), int (readline[3])
            modify (a, b, c)

            # for j in range (1, n + 1) :
            #     print (inputt[j].num, end = ' ')
            # print ('')

        elif c == 'Q' or c == '2':
            tmp = int (readline[1])
            print (query(tmp))

if __name__ == '__main__':
    main()
