#include <bits/stdc++.h>
using namespace std;
inline void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
const long long inf = 2e9 + 123;
const long long maxN = 500000 + 123;
long long t[4 * maxN];
void inc(long long v, long long lb, long long rb, long long pos) {
  if (lb + 1 == rb) {
    t[v]++;
  } else {
    long long m = (lb + rb) / 2;
    if (pos < m) {
      inc(2 * v + 1, lb, m, pos);
    } else {
      inc(2 * v + 2, m, rb, pos);
    }
    t[v] = t[2 * v + 1] + t[2 * v + 2];
  }
}
long long kth(long long v, long long lb, long long rb, long long k) {
  if (lb + 1 == rb) return lb;
  if (k > t[v]) return inf;
  long long m = (lb + rb) / 2;
  if (k <= t[2 * v + 1]) return kth(2 * v + 1, lb, m, k);
  return kth(2 * v + 2, m, rb, k - t[2 * v + 1]);
}
struct query {
  long long k, n;
  long long ind;
  query() {}
  query(long long _k, long long _pos, long long _ind)
      : k(_k), n(_pos), ind(_ind) {}
};
bool cmp(const query& a, const query& b) { return a.n < b.n; }
void solve() {
  long long n, m, q;
  cin >> m >> n >> q;
  vector<pair<long long, long long> > v(n, {0, 0});
  for (long long i = 0; i < n; ++i) {
    v[i].second = i;
  }
  for (long long i = 0; i < m; ++i) {
    long long a;
    cin >> a;
    a--;
    v[a].first++;
  }
  sort(v.begin(), v.end());
  vector<long long> filled(n, 0);
  long long pr = 0;
  for (long long i = 0; i < n; ++i) {
    filled[i] = (i)*v[i].first - pr;
    pr += v[i].first;
  }
  vector<query> Q;
  for (long long _; _ < q; ++_) {
    long long k;
    cin >> k;
    k -= 1 + m;
    long long pos =
        upper_bound(filled.begin(), filled.end(), k) - filled.begin();
    k -= filled[pos - 1];
    k %= pos;
    Q.push_back(query(k + 1, pos, _));
  }
  sort(Q.begin(), Q.end(), &cmp);
  vector<long long> ans(q, 0);
  long long now = 0;
  for (long long i = 0; i < Q.size(); ++i) {
    while (now < n && now < Q[i].n) {
      inc(0, 0, n, v[now].second);
      now++;
    }
    ans[Q[i].ind] = kth(0, 0, n, Q[i].k) + 1;
  }
  for (auto i : ans) cout << i << '\n';
}
signed main() {
  fastio();
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
