#include <bits/stdc++.h>
using namespace std;
long long n, k, p;
string solve(long long n, long long k, long long x) {
  if (k == 0) return ".";
  if (n % 2 == 1 && x == n) return "X";
  if (n % 2 == 0) {
    if (k <= n / 2) {
      if (x % 2 == 1) return ".";
      if (x / 2 + k <= n / 2) return ".";
      return "X";
    }
    if (x % 2 == 0) return "X";
    if ((x / 2 + k - n / 2) < n / 2) return ".";
    return "X";
  }
  return solve(n - 1, k - 1, x);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k >> p;
  for (int i = 1; i <= p; i++) {
    long long x;
    cin >> x;
    cout << solve(n, k, x);
  }
  cout << endl;
  return 0;
}
