#include <bits/stdc++.h>
using namespace std;
int n, m, q, c[500005], siz;
int ans[500005];
pair<long long, int> b[500005];
pair<int, int> a[500005];
bool ss(const pair<int, int> &u, const pair<int, int> &v) {
  return u.first != v.first ? u.first < v.first : u.second < v.second;
}
void up(int u) {
  for (; u <= m; u += u & -u) ++c[u];
}
int get(int u) {
  int kq = 0;
  for (; u; u -= u & -u) kq += c[u];
  return kq;
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  int u;
  for (int i = 0; i < n; ++i) scanf("%d", &u), ++a[u].first;
  for (int i = 1; i <= m; ++i) a[i].second = i;
  for (int i = 1; i <= q; ++i) scanf("%I64dd", &b[i].first), b[i].second = i;
  sort(a + 1, a + 1 + m);
  sort(b + 1, b + 1 + q);
  long long k, yea = n, pas;
  u = 1;
  int tmp, l, r, mid, kq;
  for (int i = 1; i <= q; ++i) {
    k = b[i].first;
    if (yea < k) {
      while (yea < k) {
        pas = yea;
        tmp = a[u].first;
        while (a[u].first == tmp) up(a[u].second), ++siz, ++u;
        if (u > m)
          yea = 1000000000000000000LL;
        else {
          yea += (a[u].first - tmp) * 1LL * (u - 1);
        }
      }
    }
    tmp = (k - pas - 1) % siz + 1;
    l = 1, r = m;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (get(mid) < tmp)
        l = mid + 1;
      else
        kq = mid, r = mid - 1;
    }
    ans[b[i].second] = kq;
  }
  for (int i = 1; i <= q; ++i) printf("%d\n", ans[i]);
}
