#include <bits/stdc++.h>
using namespace std;
const int M = 500002;
vector<int> bit(M);
int n, m, q;
int query(int k) {
  int i = 1;
  while (i <= m && bit[i] <= k) {
    i <<= 1;
  }
  i >>= 1;
  while ((i & 1) == 0) {
    if (i <= m && bit[i] < k) {
      k -= bit[i];
      i += (i & -i) >> 1;
    } else {
      i -= (i & -i) >> 1;
    }
  }
  if (bit[i] == k) {
    return i;
  } else {
    return i + 1;
  }
}
void update(int i, int x) {
  while (i <= m) {
    bit[i] += x;
    i += i & -i;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> q;
  vector<pair<int, int>> a(m + 1);
  vector<pair<long long, int>> x(q);
  vector<long long> s;
  int inp;
  for (int i = 0; i < n; ++i) {
    cin >> inp;
    ++a[inp].first;
  }
  for (int i = 0; i < q; ++i) {
    cin >> x[i].first;
    x[i].second = i;
  }
  for (int i = 1; i <= m; ++i) {
    a[i].second = i;
  }
  sort(a.begin() + 1, a.end());
  sort(x.begin(), x.end());
  vector<int> res(q);
  s.push_back(n + 1);
  int j = 0;
  update(a[1].second, 1);
  for (int i = 2; i <= m; ++i) {
    if (a[i].first != a[i - 1].first) {
      long long s_next =
          s.back() + (long long)(a[i].first - a[i - 1].first) * (i - 1);
      while (j < q && x[j].first < s_next) {
        res[x[j].second] = query((x[j].first - s.back()) % (i - 1) + 1);
        ++j;
      }
      s.push_back(s_next);
    }
    update(a[i].second, 1);
  }
  for (; j < q; ++j) {
    res[x[j].second] = (x[j].first - s.back()) % m + 1;
  }
  for (int i = 0; i < q; ++i) {
    cout << res[i] << '\n';
  }
  return 0;
}
