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.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.TreeSet;

public class Main {
    private static StreamTokenizer in;
    private static PrintWriter out;
    private static BufferedReader inB;
    
    private static int nextInt() throws Exception{
        in.nextToken();
        return (int)in.nval;
    }
    
    private static String nextString() throws Exception{
        in.nextToken();
        return in.sval;
    }
    
    static{
        out = new PrintWriter(System.out);
        inB = new BufferedReader(new InputStreamReader(System.in));
        in = new StreamTokenizer(inB);
    }
    
    public static void main(String[] args)throws Exception {
        int n = nextInt(), k = nextInt(), p = nextInt();

        int kk = ((n&1) == 1 && k > 0) ? (k-1) : (k);
        int numb1 = kk;
        if(numb1 > n/2)numb1 = n/2;
        
        int numb2 = numb1 != n/2 ? 0 : ((kk-n/2)/2);

        boolean odd = (n&1) != 0;
        
        for(int i = 0; i<p; i++) {
            int t = nextInt();
            if(odd && t == n) {out.print(k > 0 ? 'X' : '.');continue;}
            int cur = n - t + 1;
            
            if(odd)cur--;
            
            //if((!odd && (cur&1) == 0) || (odd && (cur&1) != 0)) {
            if((cur&1) == 0) {
                if(numb2 == 0) {out.print('.');continue;}
                
                out.print((cur-1)/2 < numb2 ? 'X' : '.');
            } else {
                out.print((cur-1)/2 < numb1 ? 'X' : '.');
            }
        }
        
        out.println();
        out.flush();
    }
    
    /////////////////////////////////////////////////////////////////
    private static void println(Object o) throws Exception {
        System.out.println(o);
    }
    private static void exit(Object o) throws Exception {
        println(o);
        exit();
    }
    private static void exit() {
        System.exit(0);
    }
    //////////////////////////////////////////////////////////////////
}
