#include <bits/stdc++.h>
using namespace std;
const int maxN = 5e5 + 7;
int N, M, Q, cnt[maxN], rt[maxN], lc[maxN * 25], rc[maxN * 25], tree[maxN * 25],
    tot = 0;
long long dp[maxN];
vector<int> vt[maxN];
inline void Insert(int &now, int old, int l, int r, int qx) {
  now = ++tot;
  tree[now] = tree[old] + 1;
  lc[now] = lc[old];
  rc[now] = rc[old];
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (qx <= mid)
    Insert(lc[now], lc[old], l, mid, qx);
  else
    Insert(rc[now], rc[old], mid + 1, r, qx);
}
inline int Query(int rt, int l, int r, int k) {
  if (l == r) return l;
  int mid = (l + r) >> 1;
  if (tree[lc[rt]] >= k)
    return Query(lc[rt], l, mid, k);
  else
    return Query(rc[rt], mid + 1, r, k - tree[lc[rt]]);
}
int main() {
  scanf("%d%d%d", &N, &M, &Q);
  for (int i = 1, u; i <= N; i++) {
    scanf("%d", &u);
    cnt[u]++;
  }
  for (int i = 1; i <= M; i++) vt[cnt[i]].push_back(i);
  dp[0] = 0;
  long long pre = 0;
  for (int i = 0, len; i <= N + 1; i++) {
    if (i) dp[i] = dp[i - 1] + pre;
    len = (int)vt[i].size();
    pre += len;
    if (i) rt[i] = rt[i - 1];
    for (int j = 0; j < len; j++) Insert(rt[i], rt[i], 1, M, vt[i][j]);
  }
  long long Kth;
  int pos;
  while (Q--) {
    scanf("%lld", &Kth);
    Kth -= N;
    pos = (int)(lower_bound(dp + 1, dp + N + 1, Kth) - dp);
    if (pos == N + 1)
      printf("%d\n", (int)((Kth - dp[N] - 1) % M + 1));
    else
      printf("%d\n", Query(rt[pos - 1], 1, M, Kth - dp[pos - 1]));
  }
  return 0;
}
