#include <bits/stdc++.h>
using namespace std;
long long int tree[500005 * 3];
void update(long long int n, long long int b, long long int e,
            long long int x) {
  if (b == e) {
    tree[n] = 1;
    return;
  }
  long long int mid = (b + e) >> 1, l = n * 2, r = l + 1;
  if (x <= mid)
    update(l, b, mid, x);
  else
    update(r, mid + 1, e, x);
  tree[n] = tree[l] + tree[r];
}
long long int query(long long int n, long long int b, long long int e,
                    long long int k) {
  if (b == e) return b;
  long long int mid = (b + e) >> 1, l = n * 2, r = l + 1;
  if (tree[l] >= k)
    return query(l, b, mid, k);
  else
    return query(r, mid + 1, e, k - tree[l]);
}
long long int fr[500005], ans[500005];
pair<long long int, long long int> p[500005];
int main() {
  long long int n, m, k, x, q, i;
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  while (cin >> n >> m >> q) {
    for (i = 1; i < n + 1; i++) {
      cin >> x;
      fr[x]++;
    }
    vector<pair<long long int, long long int> > v;
    for (i = 1; i <= m; i++) v.push_back(make_pair(fr[i], i));
    sort(v.begin(), v.end());
    long long int y1 = n + 1;
    for (i = 1; i <= q; i++) {
      cin >> x;
      p[i].first = x;
      p[i].second = i;
    }
    sort(p + 1, p + q + 1);
    long long int ind = 1;
    for (i = 0; i + 1 < v.size(); i++) {
      update(1, 1, m, v[i].second);
      long long int k = v[i + 1].first - v[i].first;
      long long int y2 = y1 + (k * (i + 1)) - 1;
      if (k == 0) {
        continue;
      }
      while (ind <= q) {
        if (p[ind].first >= y1 && p[ind].first <= y2) {
          long long int r = p[ind].first - y1 + 1;
          long long int r1 = i + 1;
          long long int r2 = r % r1;
          if (r2 == 0) r2 = r1;
          ans[p[ind].second] = query(1, 1, m, r2);
          ind++;
        } else
          break;
      }
      y1 = y2 + 1;
    }
    while (ind <= q) {
      long long int r = p[ind].second;
      long long int r1 = p[ind].first - y1 + 1;
      ans[r] = r1 % m;
      if (ans[r] == 0) ans[r] = m;
      ind++;
    }
    for (i = 1; i <= q; i++) cout << ans[i] << endl;
  }
  return 0;
}
