#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long mod = 1000000007;
const int MAXN = 500010;
int n, m, q;
struct quer {
  long long k;
  int id;
  bool operator<(const quer &b) const { return k < b.k; }
} Q[MAXN];
int ans[MAXN];
int cnt[MAXN];
int bit[MAXN];
inline void add(int p, int x) {
  while (p <= m) {
    bit[p] += x;
    p += ((p) & -(p));
  }
}
inline int sum(int p) {
  int res = 0;
  while (p > 0) {
    res += bit[p];
    p -= ((p) & -(p));
  }
  return res;
}
inline void solve() {
  sort(Q + 1, Q + 1 + q);
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      que;
  for (int i = 1; i <= m; i++)
    if (cnt[i]) {
      add(i, 1);
      que.push(pair<int, int>(cnt[i], i));
    }
  long long S = 0, pr = 0;
  int p = 1, mx = 0;
  while (que.size()) {
    S = m - sum(m);
    int l = 0, r, mid;
    while (p <= q && Q[p].k - pr <= S) {
      long long kon = Q[p].k - pr;
      r = m;
      while (l + 1 < r) {
        mid = (l + r) >> 1;
        if (mid - sum(mid) < kon)
          l = mid;
        else
          r = mid;
      }
      ans[Q[p++].id] = l + 1;
    }
    pr += S;
    mx++;
    while (que.size() && que.top().first <= mx) {
      add(que.top().second, -1);
      que.pop();
    }
  }
  while (p <= q) {
    ans[Q[p].id] = (Q[p].k - pr - 1) % m + 1;
    p++;
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1, x; i <= n; i++) {
    scanf("%d", &x);
    cnt[x]++;
  }
  for (int i = 1; i <= q; i++) {
    scanf("%lld", &Q[i].k);
    Q[i].k -= n;
    Q[i].id = i;
  }
  solve();
  for (int i = 1; i <= q; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
