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.util.*;
import java.math.*;
import static java.lang.Character.isDigit;
import static java.lang.Character.isLowerCase;
import static java.lang.Character.isUpperCase;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Character.isDigit;

public class Main{
    static void debug(Object...os){
        System.err.println(deepToString(os));
    }
    
    void run(){
//      pre();
        long n=nextLong(),k=nextLong();
        int p=nextInt();
        for(int i=0;i<p;i++) {
            int j=nextInt()-1;
            System.out.print(calc(n,k,j)==0 ? ".":"X");
        }
        System.out.println();
    }
    private int calc(long n,long k,int i){
        if(k*2>=n) {
            if(i%2==0) {
                if(i/2<n-k)return 0;
            }
            return 1;
        }
        if(n%2==1) {
            if(i==n-1)return 1;
            if(i%2==1 && (n-2-i)/2<k-1)return 1;
            return 0;
        }
        else{
            if(i%2==1 && (n-1-i)/2 < k)return 1;
        }
        return 0;
    }

    void pre() {
        for(int n=1;n<=10;n++)for(int k=1;k<n+1;k++) {
            int best=-1;
            int msk=0;
            for(int i=0;i<1<<n;i++)if(Integer.bitCount(i)==k) {
                int cnt=0;
                for(int j=0;j<n;j++) {
                    int l=j;
                    while( (i>>(n-1-l%n)&1)==0)l++;
                    if((l-j)%2==1)cnt++;
                }
                if(best<cnt) {
                    best=cnt;
                    msk=i;
                }
            }
            String s=Integer.toBinaryString(msk);
            String t="";
            for(int i=0;i<n;i++)t+=calc(n,k,i);
            while(s.length()<n)s="0" +s;
            assert s.equals(t);
            System.out.println(n+" "+k+ " " + s+" "+best);
        }
    }
    
    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 Main().run();
    }
}
