#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
long long n, k;
int p;
char ans(long long q) {
  if (k == 0) return '.';
  if (k <= (n + n % 2) / 2) {
    if (q == n) return 'X';
    if ((q >= (n - 2 * (k - 1))) && q % 2 == 0)
      return 'X';
    else
      return '.';
  } else {
    if (q == n) return 'X';
    if (q % 2 == 0 || (q >= 2 * (n - k)))
      return 'X';
    else
      return '.';
  }
}
int main() {
  cin >> n >> k >> p;
  for (int i = 0; i < p; ++i) {
    long long temp;
    cin >> temp;
    cout << ans(temp);
  }
  return 0;
}
