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

public class D80_div2 {

	static boolean test = false;

	private void solve() throws Throwable, IOException {
		long n = lread();
		long k = lread();
		int p = iread();
		
		boolean even = n % 2L == 0;
		
		String s = "";
		for (int i = 0; i < p; i++) {
			long pos = lread();
			if(even){
				if(pos % 2 == 0L){
					s += "X";
				} else {
					s += ".";
				}
			} else {
				if(pos <= n - k){
					s += ".";
				} else {
					s += "X";
				}
			}
		}
		System.out.println(s);
	}
	
	private int[] ints() throws Throwable {
		StringTokenizer st = new StringTokenizer(line());

		int[] res = new int[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Integer.parseInt(st.nextToken());
		}
		return res;
	}

	private long[] longs() throws Throwable {
		StringTokenizer st = new StringTokenizer(line());

		long[] res = new long[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Long.parseLong(st.nextToken());
		}
		return res;
	}

	public int iread() throws Exception {
		return Integer.parseInt(wread());
	}

	public double dread() throws Exception {
		return Double.parseDouble(wread());
	}

	public long lread() throws Exception {
		return Long.parseLong(wread());
	}

	public String wread() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}
	
	public String line() throws Throwable {
		return in.readLine();
	}

	public static void main(String[] args) throws Throwable {
		new D80_div2().solve();
		out.close();
	}

	public D80_div2() throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File(testDataFile)));
		}
	}

	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

	static String testDataFile = "testdata.txt";
}