#include <bits/stdc++.h>
using namespace std;
const int N = 500300;
long long a[N];
int cnt[N];
int main() {
  int n, m, q;
  int ma = 0, id = -1;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    a[i] = (long long)(cnt[x]++) * m + x;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    a[i] -= i;
  }
  while (q--) {
    long long r;
    scanf("%I64d", &r);
    r -= n;
    if (r > a[n])
      r += n;
    else
      r += lower_bound(a + 1, a + 1 + n, r) - (a + 1);
    printf("%I64d\n", (r - 1) % m + 1);
  }
}
