#include <bits/stdc++.h>
using namespace std;
long long m, k, q, n, last;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> m >> k >> q;
  n = m / 2 * 2;
  last = k;
  k -= n != m;
  while (q--) {
    long long p;
    cin >> p;
    if (p > n) {
      cout << (last ? "X" : ".");
      continue;
    }
    if (p & 1) {
      cout << ((n - p) / 2 + n / 2 + 1 <= k ? "X" : ".");
    } else {
      cout << ((n - p) / 2 + 1 <= k ? "X" : ".");
    }
  }
}
