#include <bits/stdc++.h>
using namespace std;
long long n, k, x;
int p;
int main(int argc, char* argv[]) {
  cin >> n >> k >> p;
  for (int i = 0; i < p; ++i) {
    cin >> x;
    if (k > n - k) {
      if (x <= 2 * (n - k))
        if (x & 1)
          cout << ".";
        else
          cout << "X";
      else
        cout << "X";
    } else {
      if (k == 0)
        cout << ".";
      else if (x == n)
        cout << "X";
      else if (k == 1)
        cout << ".";
      else if (n & 1) {
        if (x <= n - 2 * k + 1)
          cout << ".";
        else if (x - (n - 2 * k + 1) & 1)
          cout << ".";
        else
          cout << "X";
      } else {
        if (x <= n - 2 * k)
          cout << ".";
        else if (x - (n - 2 * k) & 1)
          cout << ".";
        else
          cout << "X";
      }
    }
  }
  cout << endl;
}
