#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int MOD = 7 + 1e9;
const int N = (1 << 19);
const long long OO = (long long)1 * 1e18;
int main() {
  cin.sync_with_stdio(0);
  long long n, k, p, a;
  cin >> n >> k >> p;
  if (k == 0) {
    while (p--) {
      cin >> a;
      cout << '.';
    }
    return 0;
  }
  if (n % 2) k--, n--;
  long long s = n - k * 2, e = 2 * n - 2 * k;
  while (p--) {
    cin >> a;
    if (a <= n && (a <= s || (a < e && a % 2)))
      cout << '.';
    else
      cout << 'X';
  }
  return 0;
}
