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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.StringTokenizer;

public class Solution {
	
	public void solve() throws IOException {
		long n = getLong();
		long k = getLong();
		int p = getInt();
		
		if (k == 0) {
			for (int i = 0; i < p; ++i) {
				getLong();
				out.print('.');
			}
		} else {
			if (n % 2 == 1) {
				--n;
				--k;
			}
			for (int i = 0; i < p; ++i) {
				long x = getLong();
				if (x > n) {
					out.print('X');
				} else {
					if (x % 2 == 0) {
						if (x / 2 <= n / 2 - k) {
							out.print('.');
						} else {
							out.print('X');
						}
					} else {
						if ((x + 1) / 2 <= n - k) {
							out.print('.');
						} else {
							out.print('X');
						}
					}
				}
			}
		}
	}

	public static void main(String[] args) throws IOException {
		Solution solution = new Solution();
		solution.run(new InputStreamReader(System.in), 
				new OutputStreamWriter(System.out));
		System.exit(0);
	}

	private BufferedReader reader;
	private StringTokenizer tokenizer;
	private String separator;
	public PrintWriter out;

	public final byte getByte() throws IOException {
		return Byte.parseByte(getToken());
	}

	public final double getDouble() throws IOException {
		return Double.parseDouble(getToken());
	}

	public final int getInt() throws IOException {
		return Integer.parseInt(getToken());
	}
	
	public final String getLine() throws IOException {
		if (tokenizer.hasMoreTokens()) {
			return tokenizer.nextToken(separator);
		}
		return reader.readLine();
	}

	public final long getLong() throws IOException {
		return Long.parseLong(getToken());
	}

	public final short getShort() throws IOException {
		return Short.parseShort(getToken());
	}
	
	public final String getToken() throws IOException {
		while (!tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
	
	public final boolean isEndOfLine() {
		return !tokenizer.hasMoreTokens();
	}
	
	public final void putBlank() {
		out.print(' ');
	}

	public final void run(Reader reader, Writer writer) throws IOException {
		this.reader = new BufferedReader(reader);
		out = new PrintWriter(writer);
		tokenizer = new StringTokenizer("");
		separator = System.getProperty("line.separator");
		separator = Character.toString(separator.charAt(separator.length() - 1));
		solve();
		out.flush();
	}
}
