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;
int best;
vector<int> bestState;
void check(vector<int> const& state) {
  int const n = (int)state.size();
  int current = 0;
  for (int i = (0); i < ((n)); ++i) {
    int moves = 0;
    int j = i;
    while (state[j] != 1) {
      ++moves;
      j = (j - 1 + n) % n;
    }
    if (moves & 1) ++current;
  }
  if (current > best || current == best && state < bestState) {
    best = current;
    bestState = state;
  }
}
void go(int pos, vector<int>& state, int k) {
  int const n = (int)state.size();
  if (pos == n) {
    check(state);
    return;
  }
  if (n - pos - 1 >= k) {
    state[pos] = 0;
    go(pos + 1, state, k);
    state[pos] = -1;
  }
  if (k > 0) {
    state[pos] = 1;
    go(pos + 1, state, k - 1);
    state[pos] = -1;
  }
}
bool solve(long long n, long long k, long long pos) {
  if (k == 0) return false;
  bool isWeapon = false;
  if (pos & 1) {
    if (n & 1) {
      if (pos == n)
        isWeapon = true;
      else {
        --n;
        --k;
        goto evenCalc;
      }
    } else {
    evenCalc:
      long long firstBound = (n + 3) / 2;
      long long delta = n - 1 - pos;
      long long kbound = firstBound + delta / 2;
      isWeapon = k >= kbound;
    }
  } else {
    if (n & 1) {
      ++n;
      isWeapon = pos >= (n - 2 * (k - 1));
    } else {
      isWeapon = pos >= (n - 2 * (k - 1));
    }
  }
  return isWeapon;
}
void test() {
  long long n;
  while (cin >> n) {
    cout << "==\n\n";
    for (int k = (1); k < (n + 1); ++k) {
      cout << "k = " << setw(2) << k << ": ";
      best = -1;
      vector<int> state(n);
      go(0, state, k);
      for (int i = (0); i < ((n)); ++i) cout << (!bestState[i] ? "." : "x");
      cout << endl;
    }
    cout << "---\n";
    for (int k = (1); k < (n + 1); ++k) {
      cout << "k = " << setw(2) << k << ": ";
      for (int i = (0); i < ((n)); ++i)
        cout << (!solve(n, k, i + 1) ? "." : "x");
      cout << endl;
    }
  }
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  long long n, k, p;
  cin >> n >> k >> p;
  for (int i = (0); i < ((p)); ++i) {
    long long pos;
    cin >> pos;
    bool isWeapon = solve(n, k, pos);
    cout << (isWeapon ? "X" : ".");
  }
  cout << endl;
  return 0;
}
