#include <iostream>
#include <vector>
#include <algorithm>

int main() {
    int n, q, k;
    std::cin >> n >> q >> k;

    std::vector<int> p(n);
    for (int& pi : p) {
        std::cin >> pi;
    }

    std::vector<int> tasks(n);
    for (int i = 0; i < n; ++i) {
        tasks[i] = i + 1;
    }

    for (int i = 0; i < q; ++i) {
        int l, r;
        std::cin >> l >> r;
        --l;
        std::vector<std::pair<int, int>> temp;

        for (int j = l; j < r; ++j) {
            temp.emplace_back(p[j - l], tasks[j]);
        }

        std::sort(temp.begin(), temp.end());

        for (int j = l; j < r; ++j) {
            tasks[j] = temp[j - l].second;
        }
    }

    std::cout << tasks[k - 1] << std::endl;

    return 0;
}
