#include <bits/stdc++.h>
using namespace std;
const int maxN = 500005;
const int maxM = 500005;
const int maxQ = 500005;
namespace ST {
int tree[1 << 20];
void update(int k, int l, int r, int p) {
  if (l == r) {
    if (l == p) tree[k]++;
    return;
  } else if (r < p || l > p) {
    return;
  } else {
    update(k * 2, l, (l + r) / 2, p);
    update(k * 2 + 1, (l + r) / 2 + 1, r, p);
    tree[k] = tree[k * 2] + tree[k * 2 + 1];
  }
}
int query(int k, int l, int r, int req) {
  if (l == r) {
    return l;
  } else {
    if (req - tree[k * 2] > 0) {
      return query(k * 2 + 1, (l + r) / 2 + 1, r, req - tree[k * 2]);
    } else {
      return query(k * 2, l, (l + r) / 2, req);
    }
  }
}
}  // namespace ST
int cnt[maxM];
vector<int> add[maxN];
vector<pair<long long int, int> > query;
int ans[maxQ];
int main() {
  int n, m, Q;
  scanf("%d %d %d", &n, &m, &Q);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  for (int i = 1; i <= m; i++) {
    add[cnt[i]].push_back(i);
  }
  for (int i = 0; i < Q; i++) {
    long long int x;
    scanf("%lld", &x);
    query.push_back(pair<long long int, int>(x, i));
  }
  sort(query.begin(), query.end());
  long long int pass = n;
  int i = 0, j = 0, mul = 0;
  while (i < Q && j < maxN) {
    while (i < Q && query[i].first <= pass + mul) {
      ans[query[i].second] = ST::query(1, 1, m, query[i].first - pass);
      i++;
    }
    pass += mul;
    for (auto x : add[j]) {
      ST::update(1, 1, m, x);
      mul++;
    }
    j++;
  }
  while (i < Q) {
    ans[query[i].second] = (query[i].first - pass + m - 1) % m + 1;
    i++;
  }
  for (int i = 0; i < Q; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
