#include <bits/stdc++.h>
#pragma comment(linker, "/STACK: 1024000000,1024000000")
using namespace std;
const int N = 5e5 + 15;
int t[N * 20], rt[N * 20], ls[N * 20], rs[N * 20], ct[N], tt = 0;
vector<int> v[N];
int n, m, q;
long long sm[N], pre;
void update(int& nw, int old, int l, int r, int x) {
  nw = ++tt;
  t[nw] = t[old] + 1;
  ls[nw] = ls[old];
  rs[nw] = rs[old];
  if (l == r) return;
  int mid = l + r >> 1;
  if (x <= mid)
    update(ls[nw], ls[old], l, mid, x);
  else
    update(rs[nw], rs[old], mid + 1, r, x);
}
int qry(int o, int l, int r, int k) {
  if (l == r) return l;
  int sz = t[ls[o]];
  int mid = l + r >> 1;
  if (k <= sz)
    return qry(ls[o], l, mid, k);
  else
    return qry(rs[o], mid + 1, r, k - sz);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0, x; i < n; i++) scanf("%d", &x), ct[x]++;
  for (int i = 1; i <= m; i++) v[ct[i]].push_back(i);
  sm[0] = 0;
  pre = 0;
  for (int i = 0; i <= n; i++) {
    int sz = v[i].size();
    if (i) sm[i] = sm[i - 1] + pre;
    pre += sz;
    if (i) rt[i] = rt[i - 1];
    for (int j = 0; j < sz; j++) update(rt[i], rt[i], 1, N, v[i][j]);
  }
  while (q--) {
    long long k;
    scanf("%lld", &k);
    k -= n;
    int p = lower_bound(sm + 1, sm + 1 + n, k) - sm;
    if (p == n + 1)
      printf("%d\n", (k - 1 - sm[n]) % m + 1);
    else
      printf("%d\n", qry(rt[p - 1], 1, N, k - sm[p - 1]));
  }
  return 0;
}
