#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  long long n, k;
  int p;
  cin >> n >> k >> p;
  long long e = n - k;
  long long first = 0, last = 0;
  if (e > k)
    first = e - k + n % 2;
  else if (e < k)
    last = k - e;
  for (int i = 0; i < p; ++i) {
    long long v;
    cin >> v;
    if (v <= first)
      cout << '.';
    else if (v >= n - last)
      cout << 'X';
    else {
      if (v % 2 == 1)
        cout << '.';
      else
        cout << 'X';
    }
  }
  cout << endl;
  return 0;
}
