#include <bits/stdc++.h>
using namespace std;
inline long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const long long maxn = 1e6 + 10;
int32_t main() {
  long long n, k, p;
  cin >> n >> k >> p;
  while (p--) {
    long long pos;
    cin >> pos;
    if (n % 2 == 0) {
      long long need;
      if (pos % 2 == 0)
        need = (n - pos) / 2 + 1;
      else
        need = n / 2 + (n - pos + 1) / 2;
      if (need <= k)
        cout << "X";
      else
        cout << ".";
    } else {
      long long need;
      if (pos == n)
        need = 1;
      else {
        if (pos % 2 == 0) {
          need = (n - pos + 1) / 2 + 1;
        } else {
          need = (n + 1) / 2 + (n - pos) / 2;
        }
      }
      if (need <= k)
        cout << "X";
      else
        cout << ".";
    }
  }
}
