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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class Main {
    
    public static void main(String[] args) throws Exception {
        int i,j,k;
        String res = "";
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        
        long N = Long.parseLong(st.nextToken());        // number of slots
        long K = Long.parseLong(st.nextToken());        // number of bullets
        int P = Integer.parseInt(st.nextToken());       // number of queries
        
        long PN = N;
        
        long queries[] = new long[P];
        
        for (i=0;i<P;i++) {
            queries[i] = Long.parseLong(br.readLine());
        }
        
        if (K == 1) {
            for (i=0;i<P;i++) {
                if (queries[i] < N) {
                    res += '.';
                } else {
                    res += 'X';
                }
            }
            System.out.println(res);
            return;
        }
        
        if (K == 0) {
            for (i=0;i<P;i++) {
                res += '.';
            }
            System.out.println(res);
            return;
        }
        
        long empty = N-K;
        
        long div = N/2;
        
        char answer[] = new char[P];
        
        if (K <= div) {
            
            if (N%2 == 0) {
                // [odd] X . X . X . X
                
                long blanks = N-(K*2-1);
                
                for (i=0;i<P;i++) {
                    if (queries[i] <= blanks) {
                        answer[i] = '.';
                    } else {
                        if (queries[i]%2 == 0) {
                            answer[i] = 'X';
                        } else {
                            answer[i] = '.';
                        }
                    }
                }
                
            } else {
                // [odd] X . X . X . XX
                N--;
                K--;
                
                long blanks = N-(K*2-1);
                
                if (N == 0)
                    blanks = 0;
                
                
                
                for (i=0;i<P;i++) {
                    
                    if (queries[i] == PN) {
                        answer[i] = 'X';
                        continue;
                    }
                    
                    if (queries[i] <= blanks) {
                        answer[i] = '.';
                    } else {
                        if (queries[i]%2 == 0) {
                            answer[i] = 'X';
                        } else {
                            answer[i] = '.';
                        }
                    }
                }
            }
            
        } else {
            long sequence = empty*2;
            
            for (i=0;i<P;i++) {
                if (queries[i] <= sequence) {
                    
                    if (queries[i]%2 == 0) {
                        answer[i] = 'X';
                    } else {
                        answer[i] = '.';
                    }
                    
                } else {
                    answer[i] = 'X';
                }
            }
            
        }
        
        for (i=0;i<P;i++) {
            res += answer[i];
        }
        
        System.out.println(res);
        
    }

}
