#include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 1e9 + 7;
constexpr int MAXN = 2e6 + 10;
using ll = long long;
int N, M, K, T;
int A[MAXN];
pair<ll, int> qrys[MAXN];
int BIT[MAXN];
void Insert(int x) {
  while (x <= M) {
    BIT[x]++;
    x += x & -x;
  }
}
int GetSum(int x) {
  int ret = 0;
  while (x > 0) {
    ret += BIT[x];
    x -= x & -x;
  }
  return ret;
}
int GetCity(int p) {
  ++p;
  int lb = 1, rb = M;
  int ret = 0;
  while (lb <= rb) {
    int mid = lb + ((rb - lb) >> 1);
    int s = GetSum(mid);
    if (s < p) {
      lb = mid + 1;
    } else {
      ret = mid;
      rb = mid - 1;
    }
  }
  return ret;
}
void Solution() {
  map<int, int> t;
  for (int i = (int)0; i < (int)N; ++i) {
    t[A[i]]++;
  }
  vector<pair<int, int>> vc;
  for (auto& p : t) {
    vc.emplace_back(p.second, p.first);
  }
  sort(vc.begin(), vc.end());
  int cur_sz = 0;
  ll pre_times = 0;
  int nxt_city = 0;
  for (int i = (int)1; i < (int)M + 1; ++i) {
    if (t.find(i) == t.end()) {
      Insert(i);
      ++cur_sz;
    }
  }
  if (cur_sz == 0) {
    cur_sz = 1;
    pre_times = vc[0].first;
    Insert(vc[0].second);
    nxt_city = 1;
  }
  vector<int> ans(K);
  ll last_day = N;
  sort(qrys, qrys + K);
  for (int i = (int)0; i < (int)K; ++i) {
    auto q = qrys[i];
    ll e = q.first - last_day;
    ll g = vc[nxt_city].first - pre_times;
    while (nxt_city < vc.size() && g * cur_sz < e) {
      last_day += g * cur_sz;
      ++cur_sz;
      pre_times = vc[nxt_city].first;
      Insert(vc[nxt_city++].second);
      g = vc[nxt_city].first - pre_times;
      e = q.first - last_day;
    }
    ll sh = (e - 1) % cur_sz;
    ans[q.second] = GetCity(sh);
  }
  for (int i = (int)0; i < (int)K; ++i) {
    cout << ans[i] << "\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  while (cin >> N >> M >> K) {
    for (int i = (int)0; i < (int)N; ++i) {
      cin >> A[i];
    }
    ll d;
    for (int k = (int)0; k < (int)K; ++k) {
      cin >> qrys[k].first;
      qrys[k].second = k;
    }
    Solution();
  }
  return 0;
}
