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;
long long a[105][2];
int main() {
  long long N, K, P, x;
  long long i;
  int j;
  while (cin >> N >> K >> P) {
    memset(a, 0, sizeof(a));
    if (N >= 2 * K) {
      long long Max1 = (N - K - 1) / 2 + 1;
      long long Max2 = K + (N - 2 * K) / 2;
      if (Max1 >= Max2) {
        a[3][0] = 1, a[3][1] = N - K;
        a[1][0] = N - K + 1, a[1][1] = N;
      } else {
        a[3][0] = 1, a[3][1] = N - 2 * K;
        a[2][0] = N - 2 * K + 1, a[2][1] = N;
      }
    } else {
      long long temp = N - 2 * (N - K);
      a[1][0] = N - temp + 1;
      a[1][1] = N;
      a[2][0] = 1;
      a[2][1] = N - temp;
    }
    for (i = 0; i < P; i++) {
      cin >> x;
      for (j = 1; j <= 3; j++) {
        if (a[j][0] <= x && x <= a[j][1]) {
          if (j == 1) cout << 'X';
          if (j == 3) cout << '.';
          if (j == 2) {
            if ((x - a[j][0]) % 2 == 0)
              cout << '.';
            else
              cout << 'X';
          }
        }
      }
    }
    cout << endl;
  }
}
