#include <bits/stdc++.h>
using namespace std;
clock_t __stt;
inline void TStart() { __stt = clock(); }
inline void TReport() {
  cerr << fixed << setprecision(3) << "\nCurrent Case Taken Time : "
       << (double)(clock() - __stt) / CLOCKS_PER_SEC << "sec\n";
}
template <typename T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T ABS(T a) {
  return a > 0 ? a : (-a);
}
template <typename T>
void UMIN(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void UMAX(T &a, T b) {
  if (b > a) a = b;
}
vector<int> tmp;
struct node {
  node *s[2];
  int key, sz, fix;
  void init(int K) {
    key = K;
    sz = 1;
    fix = rand();
    s[0] = s[1] = 0;
  }
  void pull() {
    sz = ((s[0]) ? ((s[0])->sz) : 0) + ((s[1]) ? ((s[1])->sz) : 0) + 1;
  }
  void tra() {
    tmp.push_back(key);
    if (s[0]) s[0]->tra();
    if (s[1]) s[1]->tra();
  }
};
node *merge(node *A, node *B) {
  if (!A || !B) return A ? A : B;
  if (A->fix < B->fix) {
    A->s[1] = merge(A->s[1], B);
    A->pull();
    return A;
  } else {
    B->s[0] = merge(A, B->s[0]);
    B->pull();
    return B;
  }
}
void split(node *t, node *&a, node *&b, int k) {
  if (!t) {
    a = b = 0;
    return;
  }
  if (t->key <= k) {
    a = t;
    split(t->s[1], a->s[1], b, k);
    a->pull();
  } else {
    b = t;
    split(t->s[0], a, b->s[0], k);
    b->pull();
  }
}
node *getkth(node *A, int k) {
  if (k == ((A->s[0]) ? ((A->s[0])->sz) : 0)) return A;
  if (k < ((A->s[0]) ? ((A->s[0])->sz) : 0)) return getkth(A->s[0], k);
  return getkth(A->s[1], k - ((A->s[0]) ? ((A->s[0])->sz) : 0) - 1);
}
int n, m, q, occ[500005], ans[500005];
node *ele[500005];
vector<int> vs;
pair<long long, int> qs[500005];
node *mergeT(node *A, node *B) {
  if (((A) ? ((A)->sz) : 0) > ((B) ? ((B)->sz) : 0)) swap(A, B);
  if (!A) return B;
  tmp.clear();
  A->tra();
  int i;
  for (i = 0; i < (int)tmp.size(); ++i) {
    node *p = new node, *a = 0, *b = 0;
    p->init(tmp[i]);
    split(B, a, b, p->key);
    B = merge(merge(a, p), b);
  }
  return B;
}
int main() {
  srand(19260817);
  int i, j, k;
  scanf("%d%d%d", &n, &m, &q);
  for (i = 0; i < n; ++i) {
    scanf("%d", &k);
    ++occ[--k];
  }
  for (i = 0; i < m; ++i) {
    node *p = new node;
    p->init(i);
    ele[occ[i]] = merge(ele[occ[i]], p);
  }
  for (i = 0; i <= n; ++i) {
    if (ele[i]) vs.push_back(i);
  }
  for (i = 0; i < q; ++i) {
    scanf("%I64d", &qs[i].first);
    qs[i].second = i;
  }
  sort(qs, qs + q);
  long long tick = (long long)n;
  int ptr = 0;
  node *cur = 0;
  for (i = 0; i < (int)vs.size(); ++i) {
    int d = vs[i];
    cur = mergeT(cur, ele[d]);
    long long til = ((i == (int)vs.size() - 1) ? -1ll : (vs[i + 1] - d));
    while (ptr < q) {
      if (til == -1ll ||
          qs[ptr].first - tick <= til * (long long)((cur) ? ((cur)->sz) : 0)) {
        ans[qs[ptr].second] =
            getkth(cur, (qs[ptr].first - tick - 1ll) %
                            (long long)((cur) ? ((cur)->sz) : 0))
                ->key +
            1;
        ++ptr;
      } else
        break;
    }
    tick += til * (long long)((cur) ? ((cur)->sz) : 0);
  }
  for (i = 0; i < q; ++i) printf("%d\n", ans[i]);
  return 0;
}
