from sortedcontainers import SortedList n, k, q = map(int, input().split()) a = list(map(int, input().split())) slimes = SortedList(a) for _ in range(q): ty, *arg = map(int, input().split()) if ty == 1: x = arg[0] slimes.add(x) elif ty == 2: y = arg[0] slime = slimes[k - 1] slimes.remove(slime) slimes.add(slime + y) else: print(slimes[k - 1])