#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, m;
  int p;
  cin >> n >> k >> p;
  bool flag = false;
  m = n;
  if (n % 2 == 1 and k > 0) m--, flag = true, k--;
  long long x;
  long long b;
  string s = "";
  for (int i = 0; i < p; i++) {
    cin >> x;
    b = 0;
    if (x == n and flag == true)
      s = s + 'X';
    else {
      if (x % 2 == 1)
        b = m / 2 + (m / 2 - (x + 1) / 2);
      else
        b = m / 2 - x / 2;
      b = max(b, (long long)0);
      if (b >= k)
        s = s + '.';
      else
        s = s + 'X';
    }
  }
  cout << s;
  return 0;
}
