#include <bits/stdc++.h>
using namespace std;
int n, m, Q;
const int maxn = 5e5 + 5;
int a[maxn], num1[maxn];
struct node {
  int num, id;
};
vector<node> p;
int S[maxn];
long long q[maxn];
int num[maxn];
long long cnt[maxn], Sum[maxn];
bool cmp(node a, node b) {
  if (a.num == b.num) return a.id < b.id;
  return a.num < b.num;
}
vector<int> U[maxn];
bool cherk(int u, int w, int o) {
  int q = upper_bound(U[w].begin(), U[w].end(), u) - U[w].begin();
  if (u - q >= o) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> Q;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    num[a[i]]++;
  }
  for (int i = 1; i <= m; i++) {
    num1[num[i]]++;
    for (int j = num[i] - 1; j >= 0; j--) U[j].push_back(i);
  }
  for (int i = n; i >= 0; i--) S[i] = S[i + 1] + num1[i + 1];
  for (int i = 0; i <= n; i++) cnt[i] = m - S[i];
  Sum[0] = cnt[0];
  for (int i = 1; i <= n; i++) Sum[i] = Sum[i - 1] + cnt[i];
  for (int i = 1; i <= Q; i++) {
    cin >> q[i];
    if (q[i] <= n) {
      cout << a[q[i]] << '\n';
    } else if (q[i] <= 1ll * n * m) {
      q[i] -= n;
      int pos = lower_bound(Sum, Sum + 1 + n, q[i]) - Sum;
      int l = 1, r = m, mid;
      while (l <= r) {
        mid = l + r >> 1;
        if (cherk(mid, pos, q[i] - Sum[pos - 1]))
          r = mid - 1;
        else
          l = mid + 1;
      }
      cout << l << '\n';
    } else if ((q[i] - 1ll * n * m) % m == 0)
      cout << m << '\n';
    else
      cout << (q[i] - 1ll * n * m) % m << '\n';
  }
}
