#include <bits/stdc++.h>
using namespace std;
unsigned long long n, m = 0, k;
int main() {
  cin >> n >> m >> k;
  long long l = -1, r = -1, x;
  if (n % 2 == 1 && m >= 1) {
    n--;
    m--;
  }
  if (m != 0) {
    if (m <= n / 2) {
      if (m == 1)
        l = n;
      else
        l = n - 2 * m + 2;
    } else if (m > n / 2)
      r = n - 2 * (m - (n / 2)) + 1;
  }
  cerr << "l"
       << " : " << l << '\n';
  cerr << "r"
       << " : " << r << '\n';
  for (unsigned long long i = 0; i < k; i++) {
    cin >> x;
    if (x == n + 1)
      cout << "X";
    else if (m) {
      if (r >= 0) {
        if (x >= r || x % 2 == 0)
          cout << "X";
        else if (x < r && x % 2 == 1)
          cout << ".";
      } else if (l >= 0) {
        if (x >= l && x % 2 == 0)
          cout << "X";
        else
          cout << ".";
      }
    } else if (m == 0)
      cout << ".";
  }
}
