#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 5 * 1e5 + 5;
vector<long long> city[MAX_N];
template <typename T>
class SegTree {
 private:
  size_t node_size;
  vector<T> node;
  T identity;
  function<T(T, T)> operation;
  function<T(T, T)> update;

 public:
  SegTree(size_t _node_size, T _identity, function<T(T, T)> _operation,
          function<T(T, T)> _update)
      : identity(_identity), operation(_operation), update(_update) {
    node_size = 1;
    while (node_size < _node_size) node_size *= 2;
    node = vector<T>(2 * node_size - 1, identity);
  }
  void change(int idx, T new_value) {
    int node_idx = idx + node_size - 1;
    node[node_idx] = update(node[node_idx], new_value);
    while (node_idx > 0) {
      node_idx = (node_idx - 1) / 2;
      node[node_idx] =
          operation(node[node_idx * 2 + 1], node[node_idx * 2 + 2]);
    }
  }
  T _query(int left, int right, int node_idx, int node_left, int node_right) {
    if (node_right <= left || right <= node_left) {
      return identity;
    }
    if (left <= node_left && node_right <= right) {
      return node[node_idx];
    } else {
      T left_value = _query(left, right, node_idx * 2 + 1, node_left,
                            (node_left + node_right) / 2);
      T right_value = _query(left, right, node_idx * 2 + 2,
                             (node_left + node_right) / 2, node_right);
      return operation(left_value, right_value);
    }
  }
  T query(int left, int right) { return _query(left, right, 0, 0, node_size); }
  int _search(int kth, int node_idx, int node_left, int node_right) {
    if (node_right - node_left == 1) return node_idx - node_size + 1;
    if (node[node_idx * 2 + 1] < kth)
      return _search(kth - node[node_idx * 2 + 1], node_idx * 2 + 2,
                     (node_left + node_right) / 2, node_right);
    else
      return _search(kth, node_idx * 2 + 1, node_left,
                     (node_left + node_right) / 2);
  }
  int search(int kth) { return _search(kth, 0, 0, node_size); }
  T operator[](int idx) { return node[idx + node_size - 1]; }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N, M, Q;
  cin >> N >> M >> Q;
  map<long long, long long> cnt;
  long long A;
  for (int i = 0; i < N; i++) {
    cin >> A;
    cnt[A]++;
  }
  vector<long long> host_cnt;
  for (auto i = cnt.begin(); i != cnt.end(); i++) {
    city[i->second].push_back(i->first);
    host_cnt.push_back(i->second);
  }
  for (int i = 1; i <= M; i++) {
    if (cnt[i] == 0) {
      city[0].push_back(i);
    }
  }
  if (city[0].size() > 0) host_cnt.push_back(0);
  sort(host_cnt.begin(), host_cnt.end());
  host_cnt.erase(unique(host_cnt.begin(), host_cnt.end()), host_cnt.end());
  vector<pair<long long, long long> > K(Q);
  for (int i = 0; i < Q; i++) {
    cin >> K[i].first;
    K[i].second = i;
  }
  sort(K.begin(), K.end());
  vector<long long> ans(Q);
  SegTree<long long> seg(
      M + 1, 0, [](long long a, long long b) { return a + b; },
      [](long long a, long long b) { return b; });
  int idx = 0;
  long long hosted = 0;
  int pre = 0;
  long long l = N, r = N + 1;
  for (int i = 0; i < Q; i++) {
    long long year = K[i].first;
    int ans_idx = K[i].second;
    while (idx < host_cnt.size() && !(l <= year && year < r)) {
      int city_cnt = city[host_cnt[idx]].size();
      for (int j = 0; j < city_cnt; j++) {
        seg.change(city[host_cnt[idx]][j], 1);
        hosted++;
      }
      pre = host_cnt[idx];
      idx++;
      if (idx == host_cnt.size()) break;
      l = r;
      r += hosted * (host_cnt[idx] - host_cnt[idx - 1]);
    }
    if (l <= year && year < r) {
      ans[ans_idx] = seg.search((year - l) % hosted + 1);
    } else {
      ans[ans_idx] = (year - pre * hosted - 1) % M + 1;
    }
  }
  for (int i = 0; i < Q; i++) cout << ans[i] << endl;
  return 0;
}
