#include <bits/stdc++.h>
using namespace std;
long long n, k, m, pos;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k >> m;
  for (int u = 0, _n = (int)(m); u < _n; u++) {
    cin >> pos;
    if (n % 2 == 0) {
      long long x = min(k, n - k - 1);
      long long l = n - 2 * x - (k - x);
      if (2 * k >= n) l--;
      if (pos <= l) {
        cout << ".";
        continue;
      }
      pos -= l;
      if (pos <= 2 * x + 2)
        if (pos % 2)
          cout << ".";
        else
          cout << "X";
      else
        cout << "X";
    } else {
      long long y = max(k * 2 - n, 1ll);
      long long x = k - y;
      long long l = n - 2 * x - y;
      if (pos <= l) {
        cout << ".";
        continue;
      }
      pos -= l;
      if (pos <= 2 * x)
        if (pos % 2)
          cout << ".";
        else
          cout << "X";
      else
        cout << "X";
    }
  }
  return 0;
}
