#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double eps = 1E-8;
long long n, k, x;
int p;
int main() {
  cin >> n >> k >> p;
  if (n & 1) {
    for (int i = 1; i <= p; i++) {
      long long id = 0;
      cin >> x;
      if (x == n) {
        if (k == 0)
          putchar('.');
        else
          putchar('X');
      } else {
        if (x & 1) {
          id += (x + 1) / 2;
        } else {
          id += n / 2;
          id += x / 2;
        }
        if (id > (n - k))
          putchar('X');
        else
          putchar('.');
      }
    }
    puts("");
  } else {
    for (int i = 1; i <= p; i++) {
      cin >> x;
      long long id = 0;
      if ((x & 1) == 0) {
        id += n / 2;
        id += x / 2;
        if (id > (n - k))
          putchar('X');
        else
          putchar('.');
      } else {
        id += (x + 1) / 2;
        if (id > (n - k))
          putchar('X');
        else
          putchar('.');
      }
    }
    puts("");
  }
  return 0;
}
