#include <bits/stdc++.h>
#pragma GCC optimize("Ofast, unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native,avx2")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int getrnd(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
ll getrndll(ll l, ll r) { return uniform_int_distribution<ll>(l, r)(rng); }
template <typename T1, typename T2>
inline bool relax(T1& a, const T2& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool strain(T1& a, const T2& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 5e5 + 3;
int a[N], c[N], tree[4 * N];
vector<int> cnt[N];
void update(int v, int tl, int tr, int pos) {
  if (tl == tr)
    ++tree[v];
  else {
    int tm = (tl + tr) / 2;
    if (pos <= tm)
      update(2 * v, tl, tm, pos);
    else
      update(2 * v + 1, tm + 1, tr, pos);
    tree[v] = tree[2 * v] + tree[2 * v + 1];
  }
}
int get(int v, int tl, int tr, int x) {
  if (tl == tr) return tl;
  int tm = (tl + tr) / 2;
  if (tree[2 * v] >= x)
    return get(2 * v, tl, tm, x);
  else
    return get(2 * v + 1, tm + 1, tr, x - tree[2 * v]);
}
void solve() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < n; ++i) cin >> a[i], --a[i];
  for (int i = 0; i < n; ++i) ++c[a[i]];
  for (int i = 0; i < m; ++i) cnt[c[i]].emplace_back(i);
  vector<pair<ll, int>> ask;
  for (int i = 0; i < q; ++i) {
    ll x;
    cin >> x;
    ask.emplace_back(x - n, i);
  }
  sort(ask.begin(), ask.end());
  vector<int> res(q, -1);
  ll s = 0, sz = 0;
  int cur = 0;
  for (int i = 0; i <= n; ++i) {
    for (int x : cnt[i]) update(1, 0, m - 1, x), ++sz;
    s += sz;
    while (cur < q && ask[cur].first <= s) {
      res[ask[cur].second] = get(1, 0, m - 1, sz - (s - ask[cur].first));
      ++cur;
    }
  }
  for (int i = cur; i < q; ++i) {
    res[ask[i].second] = (ask[i].first - s - 1) % m;
  }
  assert(count(res.begin(), res.end(), -1) == 0);
  for (int i = 0; i < q; ++i) cout << res[i] + 1 << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(0));
  int t = 1;
  while (t--) solve();
  return 0;
}
