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;
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const double PI2 = 8.0 * atan(1.0);
template <class T>
T MIN(const T& a, const T& b) {
  return a < b ? a : b;
}
template <class T>
T MAX(const T& a, const T& b) {
  return a > b ? a : b;
}
template <class T>
void MIN_UPDATE(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void MAX_UPDATE(T& a, const T& b) {
  if (a < b) a = b;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  long long N, K;
  int P;
  cin >> N >> K >> P;
  if (K == 0) {
    for (int p = 0; p < (int)P; ++p) {
      cout << ".";
    }
    cout << endl;
    return 0;
  }
  if (N % 2 == 0 && N >= K * 2) {
    for (int p = 0; p < (int)P; ++p) {
      long long q;
      cin >> q;
      if (q % 2 == 1) {
        cout << ".";
      } else {
        q /= 2;
        if (N / 2 - K < q) {
          cout << "X";
        } else {
          cout << ".";
        }
      }
    }
    cout << endl;
    return 0;
  }
  for (int p = 0; p < (int)P; ++p) {
    long long q;
    cin >> q;
    if (N - K < q) {
      cout << "X";
    } else {
      cout << ".";
    }
  }
  cout << endl;
}
