#include <bits/stdc++.h>
using namespace std;
const long long N = 500005;
long long s[N << 2], n, m, Q, ans[N];
struct data {
  long long x, id;
} q[N], a[N];
void PushUp(long long x) { s[x] = s[x << 1] + s[x << 1 | 1]; }
void Update(long long x, long long l, long long r, long long p, long long v) {
  if (l == r) {
    s[x] += v;
    return;
  }
  long long mid = (l + r) >> 1;
  if (mid >= p)
    Update(x << 1, l, mid, p, v);
  else
    Update(x << 1 | 1, mid + 1, r, p, v);
  PushUp(x);
}
long long Query(long long x, long long l, long long r, long long k) {
  if (l == r) return l;
  long long mid = (l + r) >> 1;
  if (s[x << 1] >= k)
    return Query(x << 1, l, mid, k);
  else
    return Query(x << 1 | 1, mid + 1, r, k - s[x << 1]);
}
bool cmp(data x, data y) {
  if (x.x == y.x)
    return x.id < y.id;
  else
    return x.x < y.x;
}
int main() {
  scanf("%lld%lld%lld", &m, &n, &Q);
  for (long long i = 1; i <= n; i++) a[i].id = i;
  for (long long i = 1; i <= m; i++) {
    long long x;
    scanf("%lld", &x);
    a[x].x++;
  }
  sort(a + 1, a + n + 1, cmp);
  for (long long i = 1; i <= Q; i++) {
    scanf("%lld", &q[i].x);
    q[i].id = i;
  }
  sort(q + 1, q + Q + 1, cmp);
  long long now = m, p1 = 1, p2 = 1, p;
  while (p1 <= n) {
    p = p1;
    while (a[p].x == a[p1].x) {
      Update(1, 1, n, a[p].id, 1);
      p++;
    }
    while (now + (a[p].x - a[p1].x) * (p - 1) >= q[p2].x && p2 <= Q) {
      long long t = (q[p2].x - now) % (p - 1);
      if (!t) t = p - 1;
      ans[q[p2].id] = Query(1, 1, n, t);
      p2++;
    }
    now += (a[p].x - a[p1].x) * (p - 1);
    p1 = p;
  }
  for (long long i = 1; i <= Q; i++) {
    if (!ans[q[i].id]) {
      long long t = (q[i].x - now) % n;
      if (!t) t = n;
      ans[q[i].id] = t;
    }
  }
  for (long long i = 1; i <= Q; i++) printf("%lld\n", ans[i]);
  return 0;
}
