#include <bits/stdc++.h>
using namespace std;
long long n, m, q;
void update(long long x, vector<long long> &tree, long long ind, int i = 0,
            int j = m - 1) {
  if (x < i || x > j) return;
  if (i == j) {
    tree[ind] = 1;
    return;
  }
  int mid = (i + j) / 2;
  update(x, tree, ind * 2, i, mid);
  update(x, tree, 2 * ind + 1, mid + 1, j);
  tree[ind] = tree[2 * ind] + tree[2 * ind + 1];
}
long long query(long long k, vector<long long> &tree, long long ind, int i = 0,
                int j = m - 1) {
  if (i == j) {
    return i;
  }
  int mid = (i + j) / 2;
  long long left = tree[2 * ind];
  if (left >= k)
    return query(k, tree, 2 * ind, i, mid);
  else
    return query(k - left, tree, 2 * ind + 1, mid + 1, j);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> q;
  vector<pair<long long, long long> > cnt(m, make_pair(0, 0));
  vector<long long> tree(4 * m, 0);
  for (int i = 0; i < m; i++) cnt[i].second = i;
  long long x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    --x;
    cnt[x].first++;
  }
  sort(cnt.begin(), cnt.end());
  vector<pair<long long, long long> > que(q);
  for (int i = 0; i < q; i++) {
    cin >> que[i].first;
    que[i].first -= n;
    que[i].second = i;
  }
  sort(que.begin(), que.end());
  vector<long long> ans(q);
  long long pre = cnt[0].first;
  long long i = 0, ct = 0, wall, gone = 0, in = 0;
  while (i < m) {
    while (i < m && pre == cnt[i].first) {
      ct++;
      update(cnt[i].second, tree, 1);
      i++;
    }
    if (i < m)
      wall = cnt[i].first;
    else
      wall = LLONG_MAX;
    while (in < q && ((que[in].first - gone) / ct < wall - cnt[i - 1].first ||
                      ((que[in].first - gone) / ct == wall - cnt[i - 1].first &&
                       (que[in].first - gone) % ct == 0))) {
      x = (que[in].first - gone - 1) % ct;
      ans[que[in].second] = query(x + 1, tree, 1);
      in++;
    }
    gone += (wall - cnt[i - 1].first) * ct;
    pre = wall;
  }
  for (auto i : ans) {
    cout << i + 1 << "\n";
  }
  return 0;
}
