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>
const double eps = (1e-10);
using namespace std;
int dcmp(double a, double b) {
  return fabs(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
long long getBit(int num, int idx) { return ((num >> idx) & 1) == 1; }
long long setBit1(long long num, int idx) { return num | (1ll << idx); }
long long setBit0(long long num, int idx) { return num & ~(1ll << idx); }
long long flipBit(long long num, int idx) { return num ^ (1ll << idx); }
void M() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int countNumBit1(long long mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1ll);
    ++ret;
  }
  return ret;
}
int main() {
  long long n, k, p;
  cin >> n >> k >> p;
  int way;
  if (n % 2 == 0) {
    if ((n - k + 1) / 2 >= n / 2)
      way = 1;
    else
      way = 0;
  } else {
    long long w = k + (k - 1);
    if (n - w + 1 % 2 == 0) {
      if ((n - k + 1) / 2 >= n / 2 + 1)
        way = 1;
      else
        way = 0;
    } else {
      if ((n - k + 1) / 2 >= n / 2)
        way = 1;
      else
        way = 2;
    }
  }
  long long x;
  for (int i = 0; i < p; i++) {
    cin >> x;
    if (way == 1) {
      long long l = n - k + 1;
      long long r = n;
      if (x >= l && x <= r)
        cout << "X";
      else
        cout << ".";
    }
    if (way == 0) {
      long long w = k + (k - 1);
      if (x < n - w + 1)
        cout << ".";
      else {
        if ((n - w + 1) % 2 == 0) {
          if (x % 2 == 0)
            cout << "X";
          else
            cout << ".";
        } else {
          if (x % 2 != 0)
            cout << "X";
          else
            cout << ".";
        }
      }
    }
    if (way == 2) {
      long long w = k + (k - 2);
      if (x < n - w + 1)
        cout << ".";
      else {
        if (x >= n - w + 1 && x <= n - 2) {
          if (x % 2 == 0)
            cout << "X";
          else
            cout << ".";
        } else
          cout << "X";
      }
    }
  }
}
