#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, m, q, c[N];
long long a[N];
int main() {
  int tmp;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 1; i <= n; i++)
    scanf("%d", &tmp), a[i] = (c[tmp]++) * 1ll * m + tmp;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) a[i] -= i;
  while (q--) {
    long long tmp;
    scanf("%I64d", &tmp);
    tmp += lower_bound(a + 1, a + n + 1, tmp - n) - a - 1 - n;
    printf("%I64d\n", (tmp - 1) % m + 1);
  }
  return 0;
}
