#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k, p;
  cin >> n >> k >> p;
  bool odd = false, even = false;
  string ans = "";
  if (n % 2 == 0)
    even = true;
  else {
    odd = true;
    k--;
  }
  for (int i = 0; i < p; i++) {
    long long tmp;
    cin >> tmp;
    if (even) {
      if (tmp % 2 == 0 && n - 2 * k < tmp)
        ans += 'X';
      else if (tmp % 2 == 1 && n - 2 * (k - n / 2) < tmp)
        ans += 'X';
      else
        ans += '.';
    } else {
      if (tmp == n && k >= 0) {
        ans += 'X';
        continue;
      }
      if (tmp % 2 == 0 && n - 2 * k <= tmp)
        ans += 'X';
      else if (tmp % 2 == 1 && n - 2 * (k - n / 2) <= tmp)
        ans += 'X';
      else
        ans += '.';
    }
  }
  cout << ans;
}
