#include <bits/stdc++.h>
using namespace std;
struct BinaryIndexedTree {
 private:
  int n, b;
  vector<int> bit;

 public:
  BinaryIndexedTree(int n_) {
    n = n_ + 10;
    b = 1;
    while (b < n) b <<= 1;
    b >>= 1;
    bit = vector<int>(n, 0);
  }
  void add(int a, int w) {
    for (int x = a; x < n; x += x & -x) bit[x] += w;
  }
  int sum(int a) {
    int ret = 0;
    for (int x = a; x > 0; x -= x & -x) ret += bit[x];
    return ret;
  }
  void update(int a, int w) {
    int v = w - sum(a) + sum(a - 1);
    add(a, v);
  }
  int lower_bound(int w) {
    if (w <= 0) return 0;
    int x = 0;
    for (int k = b; k > 0; k /= 2) {
      if (x + k < n && bit[x + k] < w) {
        w -= bit[x + k];
        x += k;
      }
    }
    return x + 1;
  }
};
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  int x;
  vector<int> ans(q);
  vector<pair<long long, int> > b(q), cnt(m);
  BinaryIndexedTree bit(m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    cnt[x - 1].first++;
  }
  for (int i = 0; i < q; ++i) {
    scanf("%lld", &b[i].first);
    b[i].second = i;
  }
  for (int i = 0; i < m; ++i) cnt[i].second = i;
  sort(cnt.begin(), cnt.end());
  sort(b.begin(), b.end());
  long long sum = n;
  int j = 0, k = 0;
  for (int i = 0; i < n; ++i) {
    if (j >= m || k >= q) break;
    while (j < m && cnt[j].first == i) {
      bit.add(cnt[j].second + 1, 1);
      j++;
    }
    int t = bit.sum(m);
    while (k < q && sum + t >= b[k].first) {
      int s = bit.lower_bound(b[k].first - sum);
      ans[b[k].second] = s;
      k++;
    }
    sum += t;
  }
  for (; k < q; ++k) ans[b[k].second] = (b[k].first - sum) % m;
  for (int i = 0; i < q; ++i) cout << (ans[i] ? ans[i] : m) << "\n";
}
