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;
template <typename T>
static ostream& operator<<(ostream& stream, const vector<T>& t);
template <typename T>
static istream& read(T, T, istream& = cin);
template <typename T>
static istream& operator>>(istream& stream, vector<T>& t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename T>
static istream& read(T b, T e, istream& stream) {
  for (T it = b; it != e; ++it) stream >> *it;
  return stream;
}
template <typename T>
static void print(T x, string end = "\n") {
  cout << x << end;
}
long long n, _k, p;
long long get(long long x) {
  long long k = _k;
  if (k == 0) return 0;
  if (x == n) return 1;
  long long fin = n;
  if (fin % 2 == 1) {
    --fin;
    --k;
  }
  if (x % 2 == 0) {
    long long d = (fin - x) / 2 + 1;
    return k >= d;
  }
  k -= fin / 2;
  if (k <= 0) return 0;
  long long d = (fin - x) / 2 + 1;
  return k >= d;
}
void _() {
  cin >> n >> _k >> p;
  vector<long long> arr(p);
  cin >> arr;
  string ans;
  for (long long x : arr) ans.push_back(".X"[get(x)]);
  print(ans);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(15);
  _();
}
