n, q, k = map(int, input().split())
perm = list(map(int, input().split()))
tasks = list(range(1, n + 1))

for _ in range(q):
    l, r = map(int, input().split())
    interv = tasks[l - 1:r]
    interv_prio = [perm[i - 1] for i in interv]
    interv = [x for _, x in sorted(zip(interv_prio, interv))]
    tasks[l - 1:r] = interv

result = tasks[k - 1]
print(result)