7 7 7
1
2
3
4
5
6
7
 4 2 8
1
3
4
2
3
4
1
2
 9 4 9
1
2
3
4
5
6
7
8
9
 7 5 7
1
2
3
4
5
6
7
 15 10 15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 4 0 4
1
2
3
4
 12 2 12
1
2
3
4
5
6
7
8
9
10
11
12
 10 2 10
1
2
3
4
5
6
7
8
9
10
 7 4 7
1
2
3
4
5
6
7
 7 3 7
1
2
3
4
5
6
7

XXXXXXX
 ..XX.X.X
 ...X.X.XX
 .X.XXXX
 .X.X.X.X.XXXXXX
 ....
 .........X.X
 .......X.X
 .X.X.XX
 ...X.XX

#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int isFirstDead(int mask, int n, int start) {
  int who = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (mask & (1 << start)) return who == 0;
    start = (start + 1) % n;
    who = who ^ 1;
  }
  return 0;
}
double prob(int mask, int n) {
  int deads = 0;
  for (int i = 0; i < (int)(n); ++i) {
    deads += isFirstDead(mask, n, i);
  }
  return 1.0 * deads / n;
}
int bestMask(int n, int k) {
  double best = 1e12;
  int bestMask = 0;
  for (int m = 0; m < (1 << n); m++) {
    int ones = 0;
    for (int j = 0; j < (int)(n); ++j)
      if (m & (1 << j)) ones++;
    if (ones != k) continue;
    double pr = prob(m, n);
    if (pr < best || pr == best && m < bestMask) {
      bestMask = m;
      best = pr;
    }
  }
  return bestMask;
}
int getDigitEven(long long n, long long k, long long x) {
  long long n2 = n / 2;
  return x % 2 == 0 && x / 2 < k || x / 2 < k - n2;
}
int getDigitOdd(long long n, long long k, long long x) {
  return getDigitEven(n, k, x + 1) || x == 0 && k > 0;
}
int getDigit(long long n, long long k, long long x) {
  if (n % 2 == 0) {
    return getDigitEven(n, k, x);
  } else
    return getDigitOdd(n, k, x);
}
int bestMask2(int n, int k) {
  int m = 0;
  for (int i = 0; i < (int)(n); ++i) m |= (getDigit(n, k, i) << i);
  return m;
}
void gen() {
  for (int n = 0; n <= 9; n++) {
    cout << n << '\n';
    for (int k = 0; k <= n; k++) {
      int mm[] = {bestMask(n, k), bestMask2(n, k)};
      for (int t = 0; t < (int)(2); ++t) {
        int m = mm[t];
        cout << '\t';
        cout << '"';
        for (int j = 0; j < (int)(n); ++j)
          cout << ((m & (1 << (n - j - 1))) ? 'X' : '.');
        cout << '"';
      }
      cout << endl;
    }
    cout << endl;
  }
}
int main() {
  long long n, k, p;
  cin >> n >> k >> p;
  for (int i = 0; i < (int)(p); ++i) {
    long long x;
    cin >> x;
    int digit = getDigit(n, k, (n - x));
    cout << (digit == 0 ? '.' : 'X');
  }
  cout << endl;
  return 0;
}
