#include <bits/stdc++.h>
using namespace std;
const int INF = 0X3F3F3F3F;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1};
inline int sgn(double x) { return x < -EPS ? -1 : x > EPS ? 1 : 0; }
template <class T>
inline T sqr(const T& x) {
  return x * x;
}
template <class T>
inline int toint(const T& x) {
  stringstream ss;
  ss << x;
  int r;
  ss >> r;
  return r;
}
template <class T>
inline int todouble(const T& x) {
  stringstream ss;
  ss << x;
  double r;
  ss >> r;
  return r;
}
template <class T>
inline string tostr(const T& x) {
  ostringstream os("");
  os << x;
  return os.str();
}
template <class T>
inline istream& operator<<(istream& is, const T& a) {
  is.putback(a);
  return is;
}
inline string tolower(string s) {
  for (int i = 0; i < (int)(s.size()); ++i) s[i] = tolower(s[i]);
  return s;
}
inline string toupper(string s) {
  for (int i = 0; i < (int)(s.size()); ++i) s[i] = toupper(s[i]);
  return s;
}
template <class T>
void stov(string s, vector<T>& vi) {
  vi.clear();
  istringstream sin(s);
  for (T v; sin >> v; vi.push_bakc(v))
    ;
}
template <class T>
void vtos(vector<T> vi, string& s) {
  ostringstream sout;
  for (int i = 0; i < vi.size(); i++) {
    if (i > 0) sout << ' ';
    sout << vi[i];
  }
  s = sout.str();
}
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <class T>
inline vector<pair<T, int> > factorize(T n) {
  vector<pair<T, int> > R;
  for (T i = 2; n > 1;) {
    if (n % i == 0) {
      int C = 0;
      for (; n % i == 0; C++, n /= i)
        ;
      R.push_back(make_pair(i, C));
    }
    i++;
    if (i > n / i) i = n;
  }
  if (n > 1) R.push_back(make_pair(n, 1));
  return R;
}
template <class T>
inline bool isprime(T n) {
  if (n < 2) return false;
  for (T i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
template <class T>
inline T phi(T n) {
  vector<pair<T, int> > R = factorize(n);
  T r = n;
  for (int i = 0; i < R.size(); i++) r = r / R[i].first * (R[i].first - 1);
  return r;
}
const int MAXN = 10086;
int a[MAXN];
vector<int> v;
int main() {
  long long n, m, x;
  int q;
  while (scanf("%I64d%I64d%d", &n, &m, &q) != EOF) {
    if (n & 1) n--, m--;
    while (q--) {
      scanf("%I64d", &x);
      if (x == n + 1 && m >= 0) {
        putchar('X');
        continue;
      }
      if (m == 0) {
        putchar('.');
        continue;
      }
      long long mid = min(m, n - m);
      long long l = n - m - mid;
      long long r = m - mid;
      if (x > l && x + r < n) {
        putchar((x - l) & 1 ? '.' : 'X');
      } else if (x <= l) {
        putchar('.');
      } else {
        putchar('X');
      }
    }
    puts("");
  }
}
