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 n, k, p;
char get(long long pos) {
  if (k == 0) return '.';
  if (k == n) return 'X';
  if (pos == 0) return '.';
  if (pos == n) return 'X';
  if (k == 1) return '.';
  if (2ll * (n - k) <= n) {
    if (pos <= 2ll * (n - k)) {
      if (pos % 2 == 1)
        return '.';
      else
        return 'X';
    } else
      return 'X';
  }
  if (n % 2 == 0) {
    if (pos <= n - 2ll * k) return '.';
    pos -= n - 2ll * k;
    if (pos % 2 == 1) return '.';
    return 'X';
  } else {
    if (pos <= n - 2ll * (k - 1) - 1)
      return '.';
    else {
      pos -= n - 2ll * (k - 1) - 1;
      if (pos % 2 == 1) return '.';
      return 'X';
    }
  }
}
int main() {
  scanf("%lld%lld%lld", &n, &k, &p);
  while (p--) {
    long long pos;
    scanf("%lld", &pos);
    printf("%c", get(pos));
  }
  printf("\n");
  return 0;
}
