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;
inline string toString(long long x) {
  string ans = "";
  bool negtive = x < 0;
  while (x) ans.push_back(x % 10 + '0'), x /= 10;
  if (ans.size() == 0) ans = "0";
  if (negtive) ans.push_back('-');
  for (long long i = 0; i < ans.size() / 2; i++)
    swap(ans[i], ans[ans.size() - 1 - i]);
  return ans;
}
inline long long toInt(const string& str) {
  long long ans = 0;
  bool negtive = str[0] == '-';
  for (long long i = negtive; i < str.size(); i++)
    ans = ans * 10 + str[i] - '0';
  if (negtive) ans *= -1;
  return ans;
}
inline long long gcd(long long x, long long y) { return x ? gcd(y % x, x) : y; }
const long long mod = 1e9 + 7;
inline signed rd() {
  signed ans = 0;
  char last = ' ', ch = getchar();
  while (!(ch >= '0' && ch <= '9')) last = ch, ch = getchar();
  while (ch >= '0' && ch <= '9')
    ans = (ans << 3) + (ans << 1) + ch - '0', ch = getchar();
  return ans;
}
inline long long QPow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
inline long long QPow(long long a, long long b, const long long& mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
const long double PI = 3.141592653589793115997963468544185161590576171875;
const long long maxn = 1000002;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  long long n, m, q, t, tmp, k, p;
  cin >> n >> k >> p;
  while (p--) {
    long long tmp;
    cin >> tmp;
    if (k == 0)
      cout << '.';
    else if (k >= (n + 1) / 2) {
      long long tmpn = n - k;
      if (tmp > 2 * tmpn)
        cout << 'X';
      else if (tmp % 2 == 1)
        cout << '.';
      else
        cout << 'X';
    } else {
      if ((n - k + 1 - k) % 2 == 0) {
        if (k == 1) {
          if (tmp < n)
            cout << '.';
          else
            cout << 'X';
        } else if (k == 2) {
          if (tmp < n - 1)
            cout << '.';
          else
            cout << 'X';
        } else {
          if (tmp > n - 2)
            cout << 'X';
          else {
            long long tmpn = n - 1;
            long long tmpk = k - 1;
            if ((tmpn - tmp + 1) > 2 * tmpk) {
              cout << '.';
            } else if ((tmpn - tmp + 1) % 2 == 0)
              cout << '.';
            else
              cout << 'X';
          }
        }
      } else {
        if ((n - tmp + 1) > 2 * k)
          cout << '.';
        else if ((n - tmp + 1) % 2 == 0)
          cout << '.';
        else
          cout << 'X';
      }
    }
  }
  return 0;
}
