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;
vector<string> who(0);
inline void add(string s) {
  string bs = s;
  for (int(i) = 0; (i) < ((int)(s).size()); ++(i)) {
    string t = s;
    rotate(t.begin(), t.begin() + i, t.end());
    if (t < bs) bs = t;
  }
  if (find((who).begin(), (who).end(), bs) == who.end()) who.push_back(bs);
}
inline void solve(int n, int k) {
  int best = 0;
  for (int(mask) = 0; (mask) < (1 << n); ++(mask)) {
    int cnt = 0;
    for (int(i) = 0; (i) < (n); ++(i))
      if (mask & (1 << i)) cnt++;
    if (cnt == k) {
      string s = "";
      for (int(i) = 0; (i) < (n); ++(i))
        if (mask & (1 << i))
          s += 'X';
        else
          s += '.';
      int howm = 0;
      for (int(shift) = 0; (shift) < (n); ++(shift)) {
        string t = s;
        rotate(t.begin(), t.begin() + shift, t.end());
        int pos = 0;
        while (t[pos] != 'X') ++pos;
        if (pos % 2 == 1) howm++;
      }
      if (howm > best) {
        who.clear();
        best = howm;
      }
      if (howm == best) add(s);
    }
  }
  sort((who).begin(), (who).end());
  cout << who[0] << endl;
}
long long n, K;
int p;
int main() {
  cin >> n >> K >> p;
  for (int(i) = 0; (i) < (p); ++(i)) {
    int first;
    cin >> first;
    --first;
    if (n % 2 == 0) {
      long long k = n - K;
      if (first % 2 == 0) {
        if (first / 2 < k)
          cout << '.';
        else
          cout << 'X';
      } else if (n / 2 + n % 2 + first / 2 < k)
        cout << '.';
      else
        cout << 'X';
    } else {
      long long k = K;
      if (k == 1) {
        if (first == n - 1)
          cout << 'X';
        else
          cout << '.';
      } else if (k <= n / 2) {
        if (first % 2 == 1 && (n - 1 - first) / 2 + 1 <= k - 1)
          cout << 'X';
        else if (first % 2 == 0 && first == n - 1)
          cout << 'X';
        else
          cout << '.';
      } else {
        if (first % 2 == 1 || (n - 1 - first) / 2 + 1 + n / 2 <= k)
          cout << 'X';
        else
          cout << '.';
      }
    }
  }
  cout << endl;
}
