import sys


class Sort:
    def __init__(self, priority):
        self.priority = priority

    def __call__(self, array):
        return sorted(array, key=lambda x: self.priority[array.index(x)])


stdin = sys.stdin.readlines()
n, q, k = map(int, stdin[0].split())
to_do = [i for i in range(1, n + 1)]
p = tuple(map(int, stdin[1].split()))
lr = tuple(map(lambda x: tuple(map(int, x.split())), stdin[2:]))

sorting = Sort(p)

for l, r in lr:
    to_do[l - 1:r] = sorting(to_do[l - 1:r])

sys.stdout.write(str(to_do[k - 1]) + "\n")
