#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000000;
struct Query {
  int id, first_i;
  long long kth;
  Query(int id, int kth, int first_i) : id(id), kth(kth), first_i(first_i) {}
};
vector<pair<long long, int>> A;
long long pre[MAXN] = {0};
class Seg {
  int l, m, r;
  Seg* ch[2];
  void pull() { sum = ch[0]->sum + ch[1]->sum; }

 public:
  int sum = 0;
  Seg(int l, int r) : l(l), r(r), m(l + r >> 1) {
    if (r - l > 1) {
      ch[0] = new Seg(l, m);
      ch[1] = new Seg(m, r);
    }
  }
  void add(int x) {
    if (r - l == 1)
      ++sum;
    else {
      if (x < m)
        ch[0]->add(x);
      else
        ch[1]->add(x);
      pull();
    }
  }
  int kth(int k) {
    assert(sum);
    if (r - l == 1)
      return l;
    else {
      if (ch[0]->sum <= k)
        return ch[1]->kth(k - ch[0]->sum);
      else
        return ch[0]->kth(k);
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<long long> cnt(m, 0);
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    ++cnt[a - 1];
  }
  for (int i = 0; i < m; ++i) A.emplace_back(cnt[i], i);
  sort(A.begin(), A.end());
  for (int i = 1; i <= m; ++i) pre[i] = pre[i - 1] + A[i - 1].first;
  vector<Query> Qs;
  for (int i = 0; i < q; ++i) {
    long long k;
    cin >> k;
    k -= n + 1;
    int r = m, l = 0;
    while (r - l > 1) {
      int m = l + r >> 1;
      (m * A[m].first > k + pre[m] ? r : l) = m;
    }
    int kth = (k + pre[r]) % r;
    Qs.emplace_back(i, kth, r);
  }
  if (m == 1) {
    for (int i = 0; i < q; ++i) cout << 1 << '\n';
    exit(0);
  }
  sort(Qs.begin(), Qs.end(),
       [](Query A, Query B) { return A.first_i < B.first_i; });
  Seg root(0, m);
  for (int i = 0, c = 0; i < q; ++i) {
    int k = Qs[i].kth;
    while (c < Qs[i].first_i) root.add(A[c].second), ++c;
    assert(root.sum > Qs[i].kth);
    Qs[i].kth = root.kth(Qs[i].kth);
  }
  sort(Qs.begin(), Qs.end(), [](Query A, Query B) { return A.id < B.id; });
  for (int i = 0; i < q; ++i) cout << Qs[i].kth + 1 << '\n';
}
