#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long inf = 1e18;
double eps = 1e-5;
long long min(long long a, long long b) { return a < b ? a : b; }
long long max(long long a, long long b) { return a > b ? a : b; }
template <typename T1, typename T2>
bool chkmin(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
bool chkmax(T1& a, T2 b) {
  if (b > a) {
    a = b;
    return 1;
  }
  return 0;
}
long long get(set<long long> c, long long ind) {
  set<long long> my2;
  while (ind > 0) {
    my2.insert(*(c.begin()));
    c.erase(c.begin());
    --ind;
  }
  long long ans = *(c.begin());
  while (my2.size()) {
    c.insert(*(my2.begin()));
    my2.erase(my2.begin());
  }
  return ans;
}
struct node {
  long long l, r;
  node *cl, *cr;
  long long sum;
};
node* build(long long l, long long r) {
  node* root = new node;
  root->l = l, root->r = r;
  root->sum = 0;
  if (l != r) {
    long long x = (l + r) / 2;
    root->cl = build(l, x);
    root->cr = build(x + 1, r);
  }
  return root;
}
long long query(long long l, long long r, node* root) {
  if (l <= root->l && root->r <= r) return root->sum;
  if (l > root->r || r < root->l) return 0;
  return query(l, r, root->cl) + query(l, r, root->cr);
}
void change(long long x, node* root) {
  if (x < root->l || x > root->r) return;
  if (root->l == x && root->r == x) {
    root->sum = 1;
    return;
  }
  change(x, root->cl);
  change(x, root->cr);
  root->sum = root->cl->sum + root->cr->sum;
}
void solve() {
  long long n, m, q;
  cin >> n >> m >> q;
  vector<long long> a(m), queries(q);
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    ++a[x - 1];
  }
  set<long long> q2;
  map<long long, long long> ans;
  for (auto& i : queries) {
    cin >> i;
    i -= n + 1;
    q2.insert(i);
  }
  vector<pair<long long, long long>> b(m);
  for (long long i = 0; i < m; ++i) b[i] = {a[i], i};
  sort((b).begin(), (b).end());
  long long nowt = 0;
  n = m;
  node* c = build(0, n - 1);
  for (long long i = 0; i < n;) {
    long long l = i - 1, r = i;
    while (r < n && b[r].first == b[i].first) ++r;
    for (long long j = i; j < r; ++j) change(b[j].second, c);
    i = r;
    long long loops = (r == n ? -1 : b[r].first - b[r - 1].first);
    l = 0;
    long long len = r - l;
    while (q2.size()) {
      long long q = *(q2.begin());
      q -= nowt;
      if (q < loops * len || loops == -1) {
        q %= len;
        auto nd = c;
        while (nd->l != nd->r) {
          if (q >= nd->cl->sum) {
            q -= nd->cl->sum;
            nd = nd->cr;
          } else {
            nd = nd->cl;
          }
        }
        ans[*(q2.begin())] = nd->l + 1;
        q2.erase(q2.begin());
      } else {
        break;
      }
    }
    nowt += loops * len;
  }
  for (auto& i : queries) cout << ans[i] << " ";
}
signed main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long test = 1;
  while (test--) {
    solve();
    cout << "\n";
  }
  cerr << "Runtime: " << (clock() + 0.0) / 1000 << "s.";
  return 0;
}
