#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long int n, k, p;
  while (cin >> n >> k >> p) {
    for (int i = 0; i < p; ++i) {
      long long int x;
      cin >> x;
      if (k == 0)
        cout << '.';
      else if (k + k < n && n % 2 != 0) {
        long long int bound = n + 1 - k - k;
        if (x == n)
          cout << "X";
        else if (x > bound) {
          if ((x - bound) % 2 == 1)
            cout << '.';
          else
            cout << 'X';
        } else
          cout << ".";
      } else if (k + k < n) {
        long long int bound = n - k - k;
        if (x <= bound) {
          cout << '.';
        } else {
          if ((x - bound) % 2 == 1)
            cout << '.';
          else
            cout << 'X';
        }
      } else {
        long long int bound = (k - n / 2);
        --x;
        if (x % 2 == 1)
          cout << 'X';
        else {
          if (x + bound * 2 < n)
            cout << '.';
          else
            cout << 'X';
        }
      }
    }
    cout << endl;
  }
  return 0;
}
