#include <bits/stdc++.h>
using namespace std;
int compare(const void *a, const void *b) { return (*(int *)a - *(int *)b); }
long long CK(int n, int k) {
  double res = 1;
  for (int i = 1; i <= k; ++i) res = res * (n - k + i) / i;
  return (long long)(res + 0.01);
}
int pow(int a, int b) {
  int res = 1;
  for (int i = 1; i <= b; i++) {
    res *= a;
  }
  return res;
}
int todecimal(char *s, int k) {
  int result = 0;
  int r = strlen(s);
  for (int j = r - 1; j >= 0; j--) {
    if (s[j] >= 'A' && s[j] <= 'Z')
      result += (s[j] - 'A' + 11) * pow(k, r - j - 1);
    else
      result += (s[j] - '0') * pow(k, r - j - 1);
  }
  return result;
}
int gcd(int a, int b, int *x, int *y) {
  if (a == 0) {
    *x = 0;
    *y = 1;
    return b;
  }
  int x1 = 0, y1 = 0;
  int d = gcd(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return d;
}
long long ab(long long x) {
  if (x < 0) return -x;
  return x;
}
int main() {
  long long n, k, p;
  cin >> n >> k >> p;
  long long a1 = 0, a2 = 0, a3;
  bool f = false;
  if (n % 2 != 0) {
    n--;
    k--;
    if (k >= 0) f = true;
  }
  if (k != 0) {
    if (k > n / 2) {
      a1 = 2;
      a2 = n - ((k - (n / 2)) * 2) + 1;
    } else
      a1 = n - (k * 2) + 2;
  }
  long long x;
  for (int i = 0; i < p; i++) {
    cin >> x;
    if (f && x > n)
      cout << "X";
    else if (x >= a2 && a2 != 0)
      cout << "X";
    else if (x % 2 == 0 && x >= a1 && a1 != 0)
      cout << "X";
    else
      cout << '.';
  }
}
