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

//package round80;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class C {

	static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	static StringTokenizer st;
	static PrintWriter out = new PrintWriter(System.out);
	
	static String nextToken() throws IOException{
		while (st==null || !st.hasMoreTokens()){
			String s = bf.readLine();
			if (s == null)
				return null;
			st = new StringTokenizer(s);
		}
		
		return st.nextToken();
	}
	
	static int nextInt() throws IOException{
		return Integer.parseInt(nextToken());
	}
	
	static long nextLong() throws IOException{
		return Long.parseLong(nextToken());
	}
	
	static String nextStr() throws IOException{
		return nextToken();
	}
	
	static double nextDouble() throws IOException{
		return Double.parseDouble(nextToken());
	}
	
	static BigInteger nextBigInt() throws IOException{
		return new BigInteger(nextToken());
	}
	
	public static void main(String[] args) throws IOException{
		long n = nextLong(),
			 k = nextLong();
		int p = nextInt();
		for (int i=0; i<p; i++){
			long x = nextLong();
			
			if (k == 0){
				out.print('.');
				continue;
			}
			
			if (k*2 >= n){
				if (x<=2*(n-k) && x%2==1)
					out.print('.');
				else
					out.print('X');
			}
			else{
				if ((n-k-k)%2 == 0){
					x = n-x+1;
					if (x<=2*k && x%2==1)
						out.print('X');
					else
						out.print('.');
				}
				else{
					if (x == n)
						out.print('X');
					else{
						x = n-x;
						if (x<=2*(k-1) && x%2==1)
							out.print('X');
						else
							out.print('.');
					}
				}
			}
		}
		
		out.flush();
	}

}
