n, q, k = map(int, input().split())
favorite_permutation = list(map(int, input().split()))
reverse_permutation = [0] * (n + 1)
for i in range(1, n + 1):
    reverse_permutation[favorite_permutation[i - 1]] = i
for _ in range(q):
    l, r = map(int, input().split())
    favorite_permutation[l - 1:r] = sorted(favorite_permutation[l - 1:r])
result = favorite_permutation[reverse_permutation[k] - 1]
print(result)
