#include <bits/stdc++.h>
using namespace std;
double PI = 3.141592653589793;
const double EPS = 1e-8;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
const int oo = 1e9;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long n, k, p;
int main() {
  scanf("%lld%lld%lld", &n, &k, &p);
  if (n % 2 != 0 && k) k--, n--;
  while (p--) {
    long long idx;
    scanf("%lld", &idx);
    if (idx > n) {
      printf("X");
      continue;
    }
    if (idx % 2 == 0) {
      long long x = (n - idx) / 2;
      if (k - x > 0) {
        printf("X");
        continue;
      }
    }
    if (idx % 2 != 0) {
      long long x = (n - idx) / 2;
      long long x2 = n / 2;
      if (k - x - x2 > 0) {
        printf("X");
        continue;
      }
    }
    printf(".");
  }
}
