#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 1000;
int n, m, q;
long long tmp;
int vis[maxn];
pair<long long, long long> a[maxn], b[maxn];
int ans[maxn];
int v[maxn * 4];
void build(int l, int r, int x) {
  v[x] = 0;
  if (r == l) {
    return;
  }
  int mid = (l + r) / 2;
  build(l, mid, x << 1);
  build(mid + 1, r, x << 1 | 1);
}
void update(int l, int r, int pos, int x) {
  if (l == pos && r == pos) {
    v[x] = 1;
    return;
  }
  int mid = (l + r) / 2;
  if (pos <= mid)
    update(l, mid, pos, x << 1);
  else
    update(mid + 1, r, pos, x << 1 | 1);
  v[x] = v[x << 1] + v[x << 1 | 1];
}
int query(int l, int r, int pos, int x) {
  if (l == r) {
    return l;
  }
  int mid = (l + r) / 2;
  if (v[x << 1] >= pos) {
    return query(l, mid, pos, x << 1);
  }
  return query(mid + 1, r, pos - v[x << 1], x << 1 | 1);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    vis[tmp]++;
  }
  build(1, m, 1);
  for (int i = 1; i <= m; ++i) {
    a[i] = {vis[i], i};
  }
  for (int i = 0; i < q; ++i) {
    cin >> tmp;
    b[i] = {tmp, i};
  }
  sort(a + 1, a + m + 1);
  sort(b, b + q);
  long long tmp = n, ttmp;
  int j = 1;
  for (int i = 0; i < q; ++i) {
    while (b[i].first > tmp && j <= m) {
      int tt = a[j].first;
      while (j <= m && a[j].first == tt) {
        update(1, m, a[j].second, 1);
        ++j;
      }
      ttmp = tmp;
      if (j > m) {
        tmp += (a[m].first - tt) * (j - 1);
      } else {
        tmp += (a[j].first - tt) * (j - 1);
      }
    }
    int ind = (b[i].first - ttmp) % (j - 1);
    if (!ind) {
      ind = j - 1;
    }
    ans[b[i].second] = query(1, m, ind, 1);
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
  return 0;
}
