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;
int64_t n, k, p;
inline void solve_alg1() {
  int64_t l = n - k * 2 + 1;
  while (p-- > 0) {
    int64_t x;
    cin >> x;
    cout << char(x <= l ? '.' : ((x - l) & 1 ? 'X' : '.'));
  }
}
inline void solve_alg2() {
  while (p-- > 0) {
    int64_t x;
    cin >> x;
    cout << char(x <= n - k ? '.' : 'X');
  }
}
inline void solve_alg3() {
  int64_t l = n - (k - 1);
  int64_t t = l - 1;
  while (p-- > 0) {
    int64_t x;
    cin >> x;
    cout << char(x == t ? 'X' : (x > l ? 'X' : '.'));
  }
}
int main(int argc, char* argv[]) {
  cin >> n >> k >> p;
  int64_t p1, p2, p3;
  p1 = k - 1 + (n - k * 2 - 1) / 2;
  p2 = (n - k) % 2 ? (n - k) / 2 + 1 : (n - k) / 2;
  p3 = ((n - k - 1) % 2 ? (n - k - 1) / 2 + 1 : (n - k - 1) / 2) + 1;
  if (k * 2 - 1 > n) p1 = -1;
  if (n < (k + 1)) p3 = -1;
  if ((p2 >= p1) && (p2 >= p3))
    solve_alg2();
  else if ((p3 >= p1) && (p3 >= p2))
    solve_alg3();
  else
    solve_alg1();
  return 0;
}
