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;
int main(int argv, char* argc[]) {
  long long unsigned n, k;
  unsigned p;
  cin >> n >> k >> p;
  string str;
  if (n % 2) {
    bool bit_range = false;
    if (k) {
      bit_range = true;
      k--;
    }
    long long unsigned lvl_one = (k >= (n - 1) / 2) ? ((n - 1) / 2) : (k);
    k -= lvl_one;
    long long unsigned lvl_two = (k >= (n - 1) / 2) ? ((n - 1) / 2) : (k);
    for (unsigned i = 0; i < p; i++) {
      long long unsigned request;
      cin >> request;
      if ((request == n) && bit_range) {
        str.push_back('X');
        continue;
      }
      if ((request == n) && !(bit_range)) {
        str.push_back('.');
        continue;
      }
      if (request % 2) {
        long long unsigned request_revers = n - request;
        long long unsigned count_revers = request_revers / 2;
        if (count_revers <= lvl_two) {
          str.push_back('X');
        } else {
          str.push_back('.');
        }
      } else {
        long long unsigned request_revers = n - request;
        long long unsigned count_revers = (request_revers + 1) / 2;
        if (count_revers <= lvl_one) {
          str.push_back('X');
        } else {
          str.push_back('.');
        }
      }
    }
  } else {
    n++;
    long long unsigned lvl_one = (k >= (n - 1) / 2) ? ((n - 1) / 2) : (k);
    k -= lvl_one;
    long long unsigned lvl_two = (k >= (n - 1) / 2) ? ((n - 1) / 2) : (k);
    for (unsigned i = 0; i < p; i++) {
      long long unsigned request;
      cin >> request;
      if (request % 2) {
        long long unsigned request_revers = n - request;
        long long unsigned count_revers = request_revers / 2;
        if (count_revers <= lvl_two) {
          str.push_back('X');
        } else {
          str.push_back('.');
        }
      } else {
        long long unsigned request_revers = n - request;
        long long unsigned count_revers = (request_revers + 1) / 2;
        if (count_revers <= lvl_one) {
          str.push_back('X');
        } else {
          str.push_back('.');
        }
      }
    }
  }
  cout << str << endl;
  return 0;
}
