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.io.*;
import java.math.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;

public class Task {
	public static void main(String[] args) throws IOException {
		//br = new BufferedReader(new FileReader("input.txt"));
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
		
		new Task().run();
		out.close();
	}
	
	static BufferedReader br;
	static PrintWriter out;
	StringTokenizer st;
	static String taskName = "";
	
	String nline() {
		try {
			return br.readLine();
		} catch (Exception exc) {
			return  null;
		}
	}
	
	String ns() {
		try {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(nline());
			}
			return st.nextToken();
		} catch (Exception exc) {
			return null;
		}
	}
	
	int ni() {
		return Integer.valueOf(ns());
	}
	
	long nl() {
		return Long.valueOf(ns());
	}

	double nd() {
		return Double.valueOf(ns());
	}
	
	void pf(String format, Object ... obj) {
		out.printf(format, obj);
	}
	
	void pln() {
		out.println();
	}
	
	void pt(Object obj) {
		out.print(obj);
	}

	
	void run() {
		//Place your code here
		long n = nl();
		long k = nl();
		int p = ni();
		
		long zCnt = n - k;
		long oCnt = k;
		
		for (int i = 0; i < p; i++) {
			long pos = nl();
			if (zCnt == n) {
				out.print('.');
				continue;
			}
			if (oCnt == n) {
				out.print('X');
				continue;
			}
			
			if (oCnt >= zCnt) {
				long rPos = zCnt * 2;
				if (pos <= rPos) {
					out.print(pos % 2 == 0 ? 'X' : '.');
				} else {
					out.print('X');
				}
				continue;
			}
			
			if ((zCnt - oCnt) % 2 == 0) {
				long rPos = n - 2 * oCnt;
				if (pos <= rPos) {
					out.print('.');
				} else {
					out.print((pos - rPos) % 2 == 0 ? 'X' : '.'); 
				}
			} else {
				long rPos = n - 1 - 2 * (oCnt - 1);
				if (pos <= rPos) {
					out.print('.');
				} else if (pos < n) {
					out.print((pos - rPos) % 2 == 0 ? 'X' : '.');
				} else {
					out.print('X');
				}
			}
			
		}
		
		
	}
}