#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma comment(linker, "/STACK:256000000")
#pragma warning(disable : 4996)
using namespace std;
mt19937 rnd(time(NULL));
long long t[2000000];
void build(vector<long long>& a, long long v, long long tl, long long tr) {
  if (tl == tr) {
    t[v] = a[tl];
  } else {
    long long tm = (tl + tr) / 2;
    build(a, v + v, tl, tm);
    build(a, v + v + 1, tm + 1, tr);
    t[v] = t[v + v] + t[v + v + 1];
  }
}
void upd(long long v, long long tl, long long tr, long long pos,
         long long col) {
  if (tl == tr) {
    t[v] = col;
  } else {
    long long tm = (tl + tr) / 2;
    if (tm >= pos) {
      upd(v + v, tl, tm, pos, col);
    } else {
      upd(v + v + 1, tm + 1, tr, pos, col);
    }
    t[v] = t[v + v] + t[v + v + 1];
  }
}
long long sum(long long v, long long tl, long long tr, long long zz) {
  if (tl == tr) return tl;
  long long m = (tl + tr) >> 1;
  if (t[v + v] >= zz) return sum(v + v, tl, m, zz);
  return sum(v + v + 1, m + 1, tr, zz - t[v + v]);
}
signed main() {
  long long k, n, q;
  cin >> k >> n >> q;
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < k; i++) {
    long long x;
    cin >> x;
    x--;
    a[x].first++;
  }
  for (long long i = 0; i < n; i++) {
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  vector<long long> pref(n);
  long long summ = a[0].first;
  for (long long i = 1; i < n; i++) {
    pref[i] = i * a[i].first - summ;
    summ += a[i].first;
  }
  vector<pair<long long, long long>> z(q);
  vector<long long> ans(q);
  for (long long i = 0; i < q; i++) {
    cin >> z[i].first;
    z[i].first -= k;
    z[i].second = i;
  }
  sort(z.begin(), z.end());
  long long col = 0;
  vector<long long> b(n);
  for (long long w = 0; w < q; w++) {
    long long r =
        lower_bound(pref.begin(), pref.end(), z[w].first) - pref.begin();
    if (r > n) r = n;
    for (long long i = col; i < r; i++) {
      b[a[i].second] = 1;
      upd(1, 0, n - 1, a[i].second, 1);
    }
    col = r;
    long long zz = (z[w].first - (long long)pref[r - 1]) % r;
    if (zz == 0) {
      zz = r;
    }
    ans[w] = sum(1, 0, n - 1, zz);
  }
  vector<long long> ans2(q);
  for (long long w = 0; w < q; w++) {
    ans2[z[w].second] = ans[w];
  }
  for (long long i = 0; i < q; i++) {
    cout << ans2[i] + 1 << '\n';
  }
  return 0;
}
