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>
using namespace std;
const long long linf = 1e18 + 5;
const int mod = (int)1e9 + 7;
const int logN = 18;
const int inf = 1e9;
const int N = 3e5 + 5;
long long x, n, k, m;
bool ctr(long long x, long long tek, long long cift) {
  if (x % 2 == 0 && x >= n - 2 * (cift - 1)) return true;
  if (x % 2 == 1 && x >= n - 2 * (tek - 1)) return true;
  return false;
}
int main() {
  scanf("%lld %lld %lld", &n, &k, &m);
  if (n % 2 == 0) {
    long long cift = min(n / 2, k);
    long long tek = k - cift;
    for (int i = 1; i <= m; i++) {
      scanf("%lld", &x);
      if (ctr(x, tek, cift))
        printf("X");
      else
        printf(".");
    }
  } else {
    n--, k--;
    long long cift = min(k, n / 2);
    long long tek = k - cift;
    for (int i = 1; i <= m; i++) {
      scanf("%lld", &x);
      if (ctr(x, tek, cift) || x > n && k >= 0)
        printf("X");
      else
        printf(".");
    }
  }
  cout << '\n';
}
