#include <bits/stdc++.h>
using namespace std;
const int N = 5 * 1e5 + 1;
int t[4 * N];
int b[N];
pair<long long, int> a[N];
pair<long long, int> qi[N];
void update(int v, int tl, int tr, int pos) {
  if (tl == tr)
    t[v] = 1;
  else {
    int tm = (tl + tr) >> 1;
    if (pos <= tm)
      update(v << 1, tl, tm, pos);
    else
      update(v * 2 + 1, tm + 1, tr, pos);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
int find(int v, int tl, int tr, int g) {
  if (tl == tr) return tl;
  int tm = (tl + tr) >> 1;
  if (t[2 * v] < g) return find(2 * v + 1, tm + 1, tr, g - t[2 * v]);
  return find(2 * v, tl, tm, g);
}
int main() {
  int n, m, q;
  cin >> n >> m >> q;
  for (int i = 0; i < m; i++) {
    a[i].first = 0;
    a[i].second = i;
  }
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x--;
    a[x].first++;
  }
  for (int i = 0; i < q; i++) {
    long long x;
    cin >> x;
    x -= n;
    qi[i].first = x;
    qi[i].second = i;
  }
  sort(qi, qi + q);
  sort(a, a + m);
  int ans[N];
  long long cs = 0;
  long long cur = 0;
  long long h = a[0].first;
  while (a[0].first == a[cs].first) {
    update(1, 0, m - 1, a[cs].second);
    cs++;
  }
  int i = 0;
  for (; i < q; i++) {
    while (qi[i].first > cs + cur) {
      cur += cs;
      h++;
      while (h == a[cs].first) {
        update(1, 0, m - 1, a[cs].second);
        cs++;
      }
      if (cs == m) {
        break;
      }
    }
    if (cs == m) {
      break;
    }
    ans[qi[i].second] = find(1, 0, m - 1, qi[i].first - cur) + 1;
  }
  for (; i < q; i++) {
    ans[qi[i].second] = (qi[i].first + n - h * m) % m;
    if (ans[qi[i].second] == 0) {
      ans[qi[i].second] = m;
    }
  }
  for (int i = 0; i < q; i++) {
    cout << ans[i] << "\n";
  }
}
