#include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ZERO (1e-10)
#define INF (1<<29)
#define CL(A,I) (memset(A,I,sizeof(A)))
#define DEB printf("DEB!\n");
#define D(X) cout<<"  "<<#X": "<<X<<endl;
#define EQ(A, B) (A+ZERO>B&&A-ZERO<B)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> i;

#define IN(n) int n; scanf("%d", &n);
#define FOR(i, m, n) for(int i(m); i<n; i++)
#define REP(i, n) FOR(i, 0, n)
#define F(n) REP(i, n)
#define FF(n) REP(j, n)
#define FT(n) FOR(k, m, n)
#define aa first
#define bb second

ll nn, kk, p;

char qry(ll a) {
    ll n = nn, k = kk;
    if(k==0) return '.';
    if(n%2==1) {
        if(a==n) return 'X';
        n--;
        k--;
    }
    

    if(k>n/2){
        if(a%2==0) return 'X';
        k-=n/2;
        if(a <= n-2*k && a%2==1) return '.';
        return 'X';
    }

    if(a <= n-2*k) return '.';
    a-=n-2*k;
    if(a%2)return '.';
    else return 'X';
}

int main() {
    cin >> nn >> kk >> p;
    REP(i, p){
    
        ll a;
        cin >> a;
        printf("%c", qry(a));
    }
    printf("\n");
}
