#include <bits/stdc++.h>
using namespace std;
std::ostream& operator<<(std::ostream& os, pair<int, int> p) {
  os << p.first << ", " << p.second;
  return os;
}
class Fenwick {
  vector<long long int> bitree;
  int sz;

 public:
  Fenwick(int n) {
    sz = n;
    bitree = vector<long long int>(n + 1);
  }
  void updateLoc(long long int ind, long long int adet) {
    while (ind <= sz) {
      bitree[ind] += adet;
      ind += (ind) & (-ind);
    }
  }
  long long int getSum(long long int ind) {
    long long int ret = 0;
    while (ind > 0) {
      ret += bitree[ind];
      ind -= ind & (-ind);
    }
    return ret;
  }
  long long int bsForSum(long long int x) {
    int low = 1, high = sz;
    int sol = -1;
    while (low <= high) {
      long long int mid = (low + high) / 2;
      long long int ng = getSum(mid);
      if (ng == x) {
        sol = mid;
        high = mid - 1;
      } else if (ng > x) {
        high = mid - 1;
      } else
        low = mid + 1;
      ;
    }
    return sol;
  }
};
Fenwick fw(500009);
long long int deleted = 0;
long long int getPhaseLen(set<pair<long long int, long long int> >& pq) {
  long long int mn = pq.begin()->first;
  ;
  long long int c = deleted;
  long long int leng = 0;
  for (auto item : pq) {
    if (item.first != mn) {
      leng = (item.first - mn) * c;
      break;
    } else
      c++;
  }
  while (pq.begin()->first == mn && !pq.empty()) {
    ;
    fw.updateLoc(pq.begin()->second, 1);
    pq.erase(pq.begin());
    deleted++;
  }
  return leng;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, q;
  cin >> n >> m >> q;
  vector<long long int> dizi(m + 1);
  for (long long int i = 0; i < n; i++) {
    long long int a;
    cin >> a;
    dizi[a]++;
  }
  set<pair<long long int, long long int> > pq;
  for (long long int i = 1; i <= m; i++) {
    pq.insert(pair<long long int, long long int>(dizi[i], i));
  }
  vector<pair<long long int, long long int> > queries;
  vector<long long int> res(q);
  for (int i = 0; i < q; i++) {
    long long int a;
    cin >> a;
    queries.push_back(pair<long long int, long long int>(a - n, i));
  }
  sort(queries.begin(), queries.end());
  long long int curphase = 0;
  long long int prevphase = 0;
  for (int i = 0; i < q; i++) {
    long long int qnow = queries[i].first;
    ;
    while (curphase < qnow) {
      ;
      prevphase = curphase;
      curphase += getPhaseLen(pq);
      if (pq.empty()) curphase = 1e18 + 5;
    };
    long long int frk = qnow - prevphase;
    long long int modul = deleted;
    long long int mdv = ((frk % modul - 1) + modul) % modul;
    res[queries[i].second] = fw.bsForSum(mdv + 1);
  }
  for (int i = 0; i < q; i++) cout << res[i] << "\n";
}
