#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, int>> query[500001];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<pair<long long, int>> c(m);
  for (int i = 0; i < m; i++) c[i] = {0, i + 1};
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    c[a - 1].first++;
  }
  sort(c.begin(), c.end());
  vector<long long> acc(m + 1, 0);
  for (int i = 1; i <= m; i++) acc[i] = acc[i - 1] + c[i - 1].first;
  for (int i = 0; i < q; i++) {
    long long k;
    cin >> k;
    k--;
    int fail = 0, pass = m;
    while (pass - fail > 1) {
      int mid = pass + fail >> 1;
      if (acc[m] - acc[mid] + c[mid].first * mid > k)
        pass = mid;
      else
        fail = mid;
    }
    query[pass].emplace_back((k - (acc[m] - acc[pass])) % pass, i);
  }
  {
    int n = 1 << 19;
    vector<int> sum(n * 2, 0);
    vector<int> ans(q);
    for (int j = 0; j <= m; j++) {
      for (auto p : query[j]) {
        int i = 1;
        while (i < n) {
          i *= 2;
          if (sum[i] <= p.first) p.first -= sum[i++];
        }
        ans[p.second] = i - n;
      }
      if (j == m) break;
      for (int i = c[j].second + n; i; i /= 2) sum[i]++;
    }
    for (int v : ans) cout << v << endl;
  }
}
