#include <bits/stdc++.h>
using namespace std;
void perm(int n, int k) {
  string s;
  for (int i = 0; i < n - k; i++) s = s + '.';
  for (int i = 0; i < k; i++) s = s + 'X';
  string best = s;
  int pos[s.size()];
  int winmax = 0;
  int win;
  do {
    win = 0;
    for (int i = 0; i < s.size(); i++) {
      bool lose = 0;
      for (int j = i;; j = (j + 2) % s.size()) {
        if (s[j] == 'X') {
          lose = 1;
          break;
        } else if (s[(j + 1) % s.size()] == 'X') {
          break;
        }
        if ((j + 2) % s.size() == i) break;
      }
      if (!lose) win++;
    }
    if (win > winmax) {
      best = s;
      winmax = win;
    }
  } while (next_permutation(s.begin(), s.end()));
  cout << n << " " << k << endl;
  cout << best << endl;
}
void solve(long long n, long long k, long long p) {
  long long dot = n - k;
  for (int i = 0; i < p; i++) {
    long long a;
    cin >> a;
    if (n % 2 == 0) {
      if (a % 2 == 1 && (1 + a / 2) <= dot)
        cout << '.';
      else if (a % 2 == 1 && (1 + a / 2) > dot)
        cout << 'X';
      else if (a % 2 == 0 && (1 + (n - a) / 2 <= k))
        cout << 'X';
      else
        cout << '.';
    } else {
      if (a == n && k != 0)
        cout << 'X';
      else {
        long long n2 = n - 1;
        long long k2 = k - 1;
        long long dot2 = n2 - k2;
        if (a % 2 == 1 && (1 + a / 2) <= dot2)
          cout << '.';
        else if (a % 2 == 1 && (1 + a / 2) > dot2)
          cout << 'X';
        else if (a % 2 == 0 && (1 + (n2 - a) / 2 <= k2))
          cout << 'X';
        else
          cout << '.';
      }
    }
  }
  cout << endl;
}
int main() {
  long long n, k, p;
  cin >> n >> k >> p;
  solve(n, k, p);
  return 0;
}
