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;
#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");
}
