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

/**
 * Created by IntelliJ IDEA.
 * User: piyushd
 * Date: 3/29/11
 * Time: 7:56 PM
 * To change this template use File | Settings | File Templates.
 */
public class TaskD {

    void solve(long n, long k, long a) {

        if(k == 1) {
            if (a == n) {
                System.out.print("X");
            }
            else {
                System.out.print(".");
            }
            return;
        }

        if(n % 2 == 1) {
            if(a == n) {
                if(k > 0)System.out.print("X");
                else System.out.print(".");
                return;
            }
            if(k > 0){
                k--;
            }
            n--;
        }

        if(n % 2 == 0) {
            if(2 * k <= n) {
                if(a <= n - 2 * k) {
                    System.out.print(".");
                } else {
                    a -= (n - 2 * k);
                    if (a % 2 == 0) {
                        System.out.print("X");
                    }
                    else {
                        System.out.print(".");
                    }
                }
            } else {
                if(a % 2 == 0) {
                    System.out.print("X");
                } else {
                    k -= (n / 2);
                    if((a + 1) / 2 <= n / 2 -  k) {
                        System.out.print(".");
                    } else {
                        System.out.print("X");
                    }
                }
            }
        }
    }

    void run() {
        long n = nextLong(), k = nextLong();
        int p = nextInt();

        for(int i = 0; i < p; i++) {
            long a = nextLong();
            solve(n, k, a);
        }
        System.out.println();
    }

    int nextInt(){
        try{
            int c = System.in.read();
            if(c == -1) return c;
            while(c != '-' && (c < '0' || '9' < c)){
                c = System.in.read();
                if(c == -1) return c;
            }
            if(c == '-') return -nextInt();
            int res = 0;
            do{
                res *= 10;
                res += c - '0';
                c = System.in.read();
            }while('0' <= c && c <= '9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }

    long nextLong(){
        try{
            int c = System.in.read();
            if(c == -1) return -1;
            while(c != '-' && (c < '0' || '9' < c)){
                c = System.in.read();
                if(c == -1) return -1;
            }
            if(c == '-') return -nextLong();
            long res = 0;
            do{
                res *= 10;
                res += c-'0';
                c = System.in.read();
            }while('0' <= c && c <= '9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }

    double nextDouble(){
        return Double.parseDouble(next());
    }

    String next(){
        try{
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while(Character.isWhitespace(c))
                c = System.in.read();
            do{
                res.append((char)c);
            }while(!Character.isWhitespace(c=System.in.read()));
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }

    String nextLine(){
        try{
            StringBuilder res = new StringBuilder("");
            int c = System.in.read();
            while(c == '\r' || c == '\n')
                c = System.in.read();
            do{
                res.append((char)c);
                c = System.in.read();
            }while(c != '\r' && c != '\n');
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }

    public static void main(String[] args){
        new TaskD().run();
    }
}
