#include <bits/stdc++.h>
using namespace std;
struct Que {
  int id;
  long long x;
  bool operator<(const Que &_) const { return x < _.x; }
} q[500005];
struct node {
  int num, id;
  bool operator<(const node &_) const {
    if (num != _.num) return num < _.num;
    return id < _.id;
  }
} a[500005];
int n, m, Q, C[500005], ans[500005], S;
void Add(int x) {
  while (x <= m) C[x]++, x += x & -x;
}
int Query(int k) {
  int res = 0, s = 0;
  for (int i = S; i; i >>= 1)
    if (res + i < m && s + C[res + i] < k) s += C[res += i];
  return res + 1;
}
int main() {
  S = 1;
  scanf("%d%d%d", &n, &m, &Q);
  for (; S < m; S <<= 1)
    ;
  S >>= 1;
  for (int i = 1, x; i <= n; i++) scanf("%d", &x), a[x].num++;
  for (int i = 1; i <= m; i++) a[i].id = i;
  sort(a + 1, a + m + 1);
  for (int i = 1; i <= Q; i++) scanf("%lld", &q[i].x), q[i].id = i, q[i].x -= n;
  sort(q + 1, q + Q + 1);
  Add(a[1].id);
  long long l = 1, r = 0;
  int k = 1;
  for (int i = 2; i <= m; i++) {
    r += 1ll * (i - 1) * (a[i].num - a[i - 1].num);
    while (k <= Q && q[k].x <= r) {
      int g = (q[k].x - l) % (i - 1) + 1;
      ans[q[k].id] = Query(g);
      k++;
    }
    l = r + 1;
    Add(a[i].id);
  }
  for (int i = k; i <= Q; i++) {
    int g = (q[i].x - l) % m + 1;
    ans[q[i].id] = Query(g);
  }
  for (int i = 1; i <= Q; i++) printf("%d\n", ans[i]);
  return 0;
}
