n, q, k = map(int, input().split())
priorities = list(map(int, input().split()))

tasks = list(range(1, n + 1))

for _ in range(q):
    l, r = map(int, input().split())
    l -= 1
    r -= 1
    segment = tasks[l:r+1]
    segment.sort(key=lambda x: priorities[x - 1])
    tasks[l:r+1] = segment

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