#include <bits/stdc++.h>
using namespace std;
const int maxx = 5e5 + 2;
int a[maxx];
vector<int> b[maxx];
struct S {
  long long h, sum;
};
vector<S> c;
struct node {
  long long id, val;
  bool operator<(const node a) const { return val < a.val; }
};
node ask[maxx];
long long ans[maxx];
struct SS {
  long long sum, mx;
  long long left, right;
} tree[maxx * 4];
void pushup(long long k) {
  tree[k].sum = tree[k << 1].sum + tree[k << 1 | 1].sum;
  tree[k].mx = max(tree[k << 1].mx, tree[k << 1 | 1].mx);
}
void build(long long k, long long l, long long r) {
  tree[k].left = l, tree[k].right = r;
  tree[k].sum = tree[k].mx = 0;
  if (l == r) {
    return;
  }
  long long mid = l + r >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  pushup(k);
}
void update(long long k, long long l, long long r) {
  long long L = tree[k].left, R = tree[k].right;
  if (L >= l && R <= r) {
    tree[k].sum = 1;
    tree[k].mx = l;
    return;
  }
  long long mid = L + R >> 1;
  if (l <= mid) update(k << 1, l, r);
  if (r > mid) update(k << 1 | 1, l, r);
  pushup(k);
}
long long query(long long k, long long K) {
  long long L = tree[k].left, R = tree[k].right;
  if (tree[k].sum == K) return tree[k].mx;
  if (tree[k << 1].sum >= K)
    return query(k << 1, K);
  else
    return query(k << 1 | 1, K - tree[k << 1].sum);
}
int32_t main() {
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 1; i <= n; i++) {
    long long x;
    scanf("%lld", &x);
    a[x]++;
  }
  for (long long i = 1; i <= m; i++) {
    b[a[i]].push_back(i);
  }
  for (long long i = 0; i <= n; i++) {
    if (b[i].size() == 0) continue;
    c.push_back(S{i, (long long)b[i].size()});
  }
  for (long long i = 1; i <= q; i++) {
    long long x;
    scanf("%lld", &x);
    ask[i].val = x;
    ask[i].id = i;
  }
  long long s = 0;
  sort(ask + 1, ask + q + 1);
  long long l = 0;
  build(1, 1, m);
  s += n;
  long long pre = 0;
  for (long long i = 1; i <= q; i++) {
    long long x = ask[i].val;
    long long k;
    if (s <= x) pre = s;
    while (l < c.size() && s < x) {
      if (l < c.size() - 1) s += c[l].sum * (c[l + 1].h - c[l].h);
      for (long long j = 0; j < b[c[l].h].size(); j++) {
        update(1, b[c[l].h][j], b[c[l].h][j]);
      }
      c[l + 1].sum += c[l].sum;
      if (s <= x) pre = s;
      l++;
    }
    k = x - pre;
    long long num = tree[1].sum;
    k %= num;
    if (k == 0) k = num;
    ans[ask[i].id] = query(1, k);
  }
  for (long long i = 1; i <= q; i++) {
    printf("%lld\n", ans[i]);
  }
}
