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<vector<long long> > matmul(vector<vector<long long> > &a,
                                  vector<vector<long long> > &b) {
  int i, j, k, n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      long long temp = 0;
      for (k = 0; k < n; k++)
        temp = (temp + a[i][k] * b[k][j]) % (1000000007LL);
      ans[i][j] = temp;
    }
  return ans;
}
vector<vector<long long> > matpwr(vector<vector<long long> > &a, long long p) {
  int n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (int i = 0; i < n; i++) ans[i][i] = 1;
  while (p) {
    if (p & 1) ans = matmul(ans, a);
    a = matmul(a, a);
    p >>= 1;
  }
  return ans;
}
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long invMod(long long n, long long mod = (1000000007LL)) {
  return pwr(n, mod - 2);
}
int main() {
  ios_base::sync_with_stdio(0);
  long long nn, kk, p;
  cin >> nn >> kk >> p;
  while (p--) {
    long long pos;
    cin >> pos;
    long long n = nn, k = kk;
    if (k == 0) {
      cout << ".";
      continue;
    }
    if (n % 2 == 0) {
      if (k <= n / 2) {
        if (pos % 2 == 0 && pos >= (n - 2 * (k - 1)))
          cout << "X";
        else
          cout << ".";
      } else {
        if (pos % 2 == 0)
          cout << "X";
        else {
          long long rem = k - n / 2;
          if (rem == 0) {
            cout << ".";
            continue;
          }
          n--;
          if (pos >= (n - 2 * (rem - 1)))
            cout << "X";
          else
            cout << ".";
        }
      }
    } else {
      if (pos == n) {
        cout << "X";
        continue;
      }
      n--;
      k--;
      if (k == 0) {
        cout << ".";
        continue;
      }
      if (k <= n / 2) {
        if (pos % 2 == 0 && pos >= (n - 2 * (k - 1)))
          cout << "X";
        else
          cout << ".";
      } else {
        if (pos % 2 == 0)
          cout << "X";
        else {
          long long rem = k - n / 2;
          if (rem == 0) {
            cout << ".";
            continue;
          }
          n--;
          if (pos >= (n - 2 * (rem - 1)))
            cout << "X";
          else
            cout << ".";
        }
      }
    }
  }
  return 0;
}
