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 double eps = 1e-6;
const int inf = (int)1e9;
const int MAX_N = 100 + 10;
const int REM = inf + 7;
long long n, k, p;
int main() {
  cin >> n >> k >> p;
  bool is_odd = n % 2;
  long long np = n - is_odd;
  long long kp = k - is_odd;
  long long ee = -1, es = -1;
  if (kp > 0) ee = np, es = np - 2 * (kp - 1);
  kp -= np / 2;
  long long oe = -1, os = -1;
  if (kp > 0) oe = np - 1, os = np - 1 - 2 * (kp - 1);
  for (int i = 0; i < p; i++) {
    long long x;
    cin >> x;
    if (k == 0)
      cout << '.';
    else if (k == n)
      cout << 'X';
    else if (is_odd && x == n)
      cout << 'X';
    else {
      if (ee != -1 && x % 2 == 0 && x >= es && x <= ee)
        cout << 'X';
      else if (oe != -1 && x % 2 && x >= os && x <= oe)
        cout << 'X';
      else
        cout << '.';
    }
  }
  cout << endl;
  return 0;
}
