func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 5e5 + 10;   int n, m, q, times[maxn];   long long a[maxn];   int main() {     scanf( %d%d%d , &n, &m, &q);     for (int i = 1; i <= n; ++i) {       int x;       scanf( %d , &x);       a[i] = (long long)(times[x]++) * m + x;     }     sort(a + 1, a + 1 + n);     for (int i = 1; i <= n; ++i) a[i] -= i;     while (q--) {       long long k;       scanf( %lld , &k);       k += lower_bound(a + 1, a + 1 + n, k - n) - a - 1 - n;       printf( %lld n , (k - 1) % m + 1);     }     return 0;   }   