import sys
from operator import itemgetter

def main():
    input = sys.stdin.readline
    output = sys.stdout.write

    n, g, k = map(int, input().split())
    arr = list(map(int, input().split()))

    a = list(map(int, input().split()))
    mod = 10 ** 9 + 7

    perm = [(arr[i], i+1) for i in range(n)]
    perm.sort(key=itemgetter(0))

    ans = perm[k-1][1]

    for i in range(g-1):
        for j in range(a[2*i]-1, a[2*i+1]):
            perm[j], perm[j+1] = perm[j+1], perm[j]

        perm.sort(key=itemgetter(0))

        if k > 1:
            ans = perm[k-2][1]
        else:
            ans = perm[k-1][1]

    output(str(ans % mod))
    main()
