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.*;
import java.util.*;




public class D {
    String s = null;
    String[] ss = null;
   
    
    Map<Integer, List<Integer>> target = new HashMap<Integer, List<Integer>>();
    
    public void run() throws Exception{

    	BufferedReader br = null;
        File file = new File("input.txt");
        if(file.exists()){
        br = new BufferedReader(new FileReader("input.txt"));
        }
        else{
                br = new BufferedReader(new InputStreamReader(System.in));
        }

        s = br.readLine();
        ss = s.split(" ");
        
        long n = Long.parseLong(ss[0]);
        long m = Long.parseLong(ss[1]);
        long p = Long.parseLong(ss[2]);
        
        List<Long> qu = new ArrayList<Long>();
        for(int i = 0; i < p; i++){
        	s = br.readLine();
        	long q = Long.parseLong(s);
        	qu.add(q);
        }
        
        if(n % 2 == 0 && m <= n/2){
        	Set<Long> bul = new HashSet<Long>();
        	for(int i = 0; i < p; i++){
        		long pos = n - 2 * i;
        		bul.add(pos);
        	}
        	StringBuilder sb = new StringBuilder();
            for(int i = 0; i < qu.size(); i++){
            	long pos = qu.get(i);
            	if(bul.contains(pos)){
            		sb.append("X");
            	}
            	else{
            		sb.append(".");
            	}
            }
            System.out.println(sb.toString());
            return;
        }
        else{
        	Set<Long> bul = new HashSet<Long>();
        	
        	long pos = n;
        	long num = p;
        	while(num > 0){
        		bul.add(pos);
        		num--;
        		pos--;
        	}
        	
        	
        	StringBuilder sb = new StringBuilder();
            for(int i = 0; i < qu.size(); i++){
            	pos = qu.get(i);
            	if(bul.contains(pos)){
            		sb.append("X");
            	}
            	else{
            		sb.append(".");
            	}
            }
            System.out.println(sb.toString());
            return;
        }
        
            
    }
    
   

   
  
        
        /**
         * @param args
         */
        public static void main(String[] args) throws Exception{
                D t = new D();
                t.run();

        }

}