#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  int p;
  cin >> n >> k >> p;
  long long ndiv2 = n / 2;
  long long ndiv2minus1 = n / 2 - 1;
  long long nminusk = n - k;
  for (int i = 0; i < p; i++) {
    long long x;
    scanf("%I64d", &x);
    printf("%c", ((((x == n) ? (n)
                             : (1 + (x / 2) * ndiv2 -
                                ((x - 1) / 2) * ndiv2minus1)) <= nminusk)
                      ? ('.')
                      : ('X')));
  }
exit:
  return (0);
}
