#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, m, q;
int a[N];
int ans[N];
int fenw[N];
map<int, int> cnt;
map<int, bool> used;
vector<int> mat[N];
vector<pair<long long, int> > vec;
void update(int i, int val) {
  for (; i < N; i += i & (-i)) {
    fenw[i] += val;
  }
}
int query(int i) {
  int ans = 0;
  for (; i > 0; i -= i & (-i)) {
    ans += fenw[i];
  }
  return ans;
}
int query(int x, int y) {
  if (x > y) return 0;
  return query(y) - (x > 1 ? query(x - 1) : 0);
}
int bs(int i, int d) {
  int l = i, r = N - 1, ans;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (query(i, mid) >= d) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  return ans;
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    cnt[a[i]]++;
  }
  for (int i = 0; i < q; i++) {
    long long x;
    scanf("%I64d", &x);
    vec.emplace_back(make_pair(x, i));
  }
  vec.emplace_back(make_pair(n, -1));
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n; i++) {
    if (!used[a[i]]) {
      used[a[i]] = 1;
      mat[cnt[a[i]]].emplace_back(a[i]);
    }
  }
  for (int i = 1; i <= m; i++) {
    if (cnt[i] == 0) {
      mat[0].emplace_back(i);
    }
  }
  int pos = 0;
  while (mat[pos].empty()) pos++;
  pos--;
  int lst = m + 1;
  long long days = 0;
  for (int i = 0; i < vec.size();) {
    if (days == 0) {
      if (i + 1 >= vec.size()) break;
      i++;
      days = vec[i].first - vec[i - 1].first;
    }
    if (lst == m + 1) {
      if (pos < N) {
        pos++;
        for (int x : mat[pos]) {
          update(x, 1);
        }
      }
      lst = 1;
    }
    if (days == 0) {
      ans[vec[i].second] = ans[vec[i - 1].second];
      continue;
    }
    if (lst != 1) {
      if (days > query(lst, N - 1)) {
        days -= query(lst, N - 1);
        lst = m + 1;
        continue;
      } else {
        int here = bs(lst, days);
        lst = here + 1;
        ans[vec[i].second] = here;
        days = 0;
      }
    } else {
      if (days > query(lst, N - 1)) {
        if (pos < N) {
          days -= query(lst, N - 1);
          lst = m + 1;
          continue;
        } else {
          days %= m;
          if (days == 0) days = m;
          int here = bs(lst, days);
          lst = here + 1;
          ans[vec[i].second] = here;
          days = 0;
          continue;
        }
      } else {
        int here = bs(lst, days);
        lst = here + 1;
        ans[vec[i].second] = here;
        days = 0;
      }
    }
  }
  for (int i = 0; i < q; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
