#include <bits/stdc++.h>
using namespace std;
struct node {
  int l;
  int r;
  int val;
  node() {}
  node(int _l, int _r, int _val) : l(_l), r(_r), val(_val) {}
};
int n;
int m;
long long q;
string s;
vector<int> a;
vector<int> root;
vector<node> tree;
int T;
vector<pair<int, int>> freq;
vector<long long> prefix_sum;
vector<int> cnt;
int update(int &idx, int lup, int rup, int l, int r, int prev_idx) {
  if (lup <= l && r <= rup) {
    tree[idx] = node(0, 0, 1);
    idx++;
    return idx - 1;
  }
  if (l > rup || lup > r) return 0;
  int cur_idx = idx;
  tree[cur_idx] = node(0, 0, 0);
  idx++;
  int mid = (l + r) / 2;
  tree[cur_idx].l = update(idx, lup, rup, l, mid, tree[prev_idx].l);
  tree[cur_idx].r = update(idx, lup, rup, mid + 1, r, tree[prev_idx].r);
  tree[cur_idx].l = max(tree[prev_idx].l, tree[cur_idx].l);
  tree[cur_idx].r = max(tree[prev_idx].r, tree[cur_idx].r);
  tree[cur_idx].val = tree[tree[cur_idx].l].val + tree[tree[cur_idx].r].val;
  return cur_idx;
}
void build_persistent_segment_tree(vector<pair<int, int>> &freq) {
  root.resize(n + 2);
  tree.resize(4 * 500005 + 500005 * 21);
  map<int, vector<int>> mapp;
  for (auto u : freq) mapp[u.first].push_back(u.second);
  int k = 0;
  int last = 0;
  T = 1;
  for (auto u : mapp) {
    for (auto u2 : u.second) {
      root[k] = update(T, u2, u2, 1, m, last);
      last = root[k];
    }
    last = root[k];
    k++;
  }
}
void get_and_sort_frequencies(vector<int> &a, vector<pair<int, int>> &freq) {
  map<int, int> mapp;
  for (int i = 1; i <= m; i++) mapp[i] = 0;
  for (auto u : a) mapp[u]++;
  for (auto u : mapp) freq.push_back({u.second, u.first});
  sort(freq.begin(), freq.end());
  a.clear();
}
void create_prefix_sums(vector<pair<int, int>> &freq,
                        vector<long long> &prefix_sum, vector<int> &cnt) {
  map<int, int> mapp;
  vector<long long> height;
  for (auto u : freq) mapp[u.first]++;
  int ff = mapp.begin()->first;
  for (auto u : mapp) {
    height.push_back(u.first - ff);
    cnt.push_back(u.second);
  }
  for (int i = 1; i < (int)cnt.size(); i++) cnt[i] += cnt[i - 1];
  int sum = height[0];
  for (int i = 1; i < (int)cnt.size(); i++) {
    prefix_sum.push_back(height[i] * cnt[i - 1] - sum);
    sum += height[i] * (cnt[i] - cnt[i - 1]);
  }
  prefix_sum.push_back(2e18);
  freq.clear();
}
int query(int cur_idx, int l, int r, long long x) {
  if (l == r) return r;
  int mid = (l + r) / 2;
  if (tree[tree[cur_idx].l].val >= x) return query(tree[cur_idx].l, l, mid, x);
  return query(tree[cur_idx].r, mid + 1, r, x - tree[tree[cur_idx].l].val);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> q;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  get_and_sort_frequencies(a, freq);
  build_persistent_segment_tree(freq);
  create_prefix_sums(freq, prefix_sum, cnt);
  for (int i = 0; i < q; i++) {
    long long x;
    cin >> x;
    x -= n;
    int idx = (int)(lower_bound(prefix_sum.begin(), prefix_sum.end(), x) -
                    prefix_sum.begin());
    if (idx > 0) x -= prefix_sum[idx - 1];
    x = (x - 1) % cnt[idx];
    cout << query(root[idx], 1, m, x + 1) << endl;
  }
  return 0;
}
