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;
void perm(int n, int k) {
  string s;
  for (int i = 0; i < n - k; i++) s = s + '.';
  for (int i = 0; i < k; i++) s = s + 'X';
  string best = s;
  int pos[s.size()];
  int winmax = 0;
  int win;
  do {
    win = 0;
    for (int i = 0; i < s.size(); i++) {
      bool lose = 0;
      for (int j = i;; j = (j + 2) % s.size()) {
        if (s[j] == 'X') {
          lose = 1;
          break;
        } else if (s[(j + 1) % s.size()] == 'X') {
          break;
        }
        if ((j + 2) % s.size() == i) break;
      }
      if (!lose) win++;
    }
    if (win > winmax) {
      best = s;
      winmax = win;
    }
  } while (next_permutation(s.begin(), s.end()));
  cout << n << " " << k << endl;
  cout << best << endl;
}
void solve(long long n, long long k, long long p) {
  long long dot = n - k;
  for (int i = 0; i < p; i++) {
    long long a;
    cin >> a;
    if (n % 2 == 0) {
      if (a % 2 == 1 && (1 + a / 2) <= dot)
        cout << '.';
      else if (a % 2 == 1 && (1 + a / 2) > dot)
        cout << 'X';
      else if (a % 2 == 0 && (1 + (n - a) / 2 <= k))
        cout << 'X';
      else
        cout << '.';
    } else {
      if (a == n && k != 0)
        cout << 'X';
      else {
        long long n2 = n - 1;
        long long k2 = k - 1;
        long long dot2 = n2 - k2;
        if (a % 2 == 1 && (1 + a / 2) <= dot2)
          cout << '.';
        else if (a % 2 == 1 && (1 + a / 2) > dot2)
          cout << 'X';
        else if (a % 2 == 0 && (1 + (n2 - a) / 2 <= k2))
          cout << 'X';
        else
          cout << '.';
      }
    }
  }
  cout << endl;
}
int main() {
  long long n, k, p;
  cin >> n >> k >> p;
  solve(n, k, p);
  return 0;
}
