import sys input = sys.stdin.readline N, Q = map(int, input().split()) X = [int(input()) for _ in range(N)] query = [] A = dict() zero = 10**6 i = 0 for x in X: if x==0: query.append((2, zero)) zero += 1 else: if x in A: query.append((2, A[x])) else: query.append((1, i+1, x)) query.append((2, i+1)) A[x] = i+1 i+=1 while len(query)