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:64000000")
using namespace std;
template <typename T>
inline T Abs(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline T sqr(T a) {
  return a * a;
}
template <typename T>
inline void relaxMin(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
inline void relaxMax(T &a, T b) {
  if (b > a) a = b;
}
const int INF = (int)1E9;
const long double EPS = 1E-12;
const long double PI = 3.1415926535897932384626433832795;
long long n, k, p;
long long q[1000];
void ok() { putchar('X'); }
void fail() { putchar('.'); }
void calc(long long n0, long long qq, long long k0) {
  if (k0 == 0) {
    fail();
    return;
  }
  if (qq & 1) {
    long long pos = (qq - 1) / 2;
    long long ost = k0 - n0 / 2;
    if (ost <= 0)
      fail();
    else {
      if (pos < ost)
        ok();
      else
        fail();
    }
  } else {
    if (qq < k0 * 2)
      ok();
    else
      fail();
  }
}
void solve() {
  cin >> n >> k >> p;
  for (int i = 0, _n(p); i < _n; i++) cin >> q[i];
  for (int i = 0, _n(p); i < _n; i++) q[i] = n - q[i];
  if (k == 0) {
    for (int i = 0, _n(p); i < _n; i++) fail();
    return;
  }
  if (n & 1) {
    for (int i = 0, _n(p); i < _n; i++) {
      if (q[i] == 0)
        ok();
      else {
        calc(n - 1, q[i] - 1, k - 1);
      }
    }
  } else {
    for (int i = 0, _n(p); i < _n; i++) {
      calc(n, q[i], k);
    }
  }
}
int main() {
  solve();
  return 0;
}
