#include <bits/stdc++.h>
using namespace std;
long long n, k;
int p;
int main() {
  cin >> n >> k >> p;
  for (int i = 1; i <= p; i++) {
    long long x;
    cin >> x;
    if (n % 2 == 0) {
      long long z = (n - x) / 2;
      long long tmp = k - n / 2;
      z++;
      if ((z <= k && x % 2 == 0) || (x % 2 == 1 && z <= tmp && tmp > 0))
        cout << "X";
      else
        cout << ".";
    } else {
      if (k == 0) {
        cout << ".";
        continue;
      }
      if (x == n) {
        cout << "X";
        continue;
      }
      long long z = (n - x + 1) / 2;
      long long tmp = k - (n + 1) / 2;
      z++;
      if ((z <= k && x % 2 == 0) || (x % 2 == 1 && z - 1 <= tmp && tmp > 0))
        cout << "X";
      else
        cout << ".";
    }
  }
  cout << endl;
}
