#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 10;
int main() {
  ios::sync_with_stdio(0), ios_base::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  ;
  long long n, k, q, odds, evens;
  cin >> n >> k >> q;
  if (!(n & 1)) {
    odds = n, evens = 0;
    long long energy = (n >> 1);
    if (k <= energy)
      odds = (k << 1) - 1;
    else
      evens = ((k - energy) << 1);
  } else {
    odds = (k > 0), evens = n - 1;
    long long energy = (n >> 1) + 1;
    if (k <= energy)
      evens = (k - 1) << 1;
    else
      odds = (((k - energy) << 1) | 1);
  }
  while (q--) {
    long long x;
    cin >> x;
    x = n - x + 1;
    if ((x & 1) && odds >= x)
      cout << 'X';
    else if (!(x & 1) && (evens >= x))
      cout << 'X';
    else
      cout << '.';
  }
  return 0;
}
