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.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        long n = in.nextLong();
        long k = in.nextLong();
        int p = in.nextInt();
        while (p-- > 0) {
            long pos = in.nextLong();
            if (k == 0) {
                out.print(".");
            } else if (k == 1) {
                if (pos == n) {
                    out.print("X");
                } else {
                    out.print(".");
                }
            } else if (k == 2 && n % 2 == 1) {
                if (pos >= n-1) {
                    out.print("X");
                } else {
                    out.print(".");
                }
            } else {
                out.print(calcOnPos(n, k, pos));
            }
        }
    }

    private char calcOnPos(long n, long k, long pos) {
        if (k <= n / 2) {
            long suffixLength = 2L * k;
            long startPos = n - suffixLength + 1;
            if (pos >= startPos) {
                if (n % 2 == 0) {
                    return pos % 2 == 0 ? 'X' : '.';
                } else {
                    return pos % 2 == 1 ? 'X' : '.';
                }
            } else {
                return '.';
            }
        } else {
            if (pos % 2 == n % 2) {
                return 'X';
            } else {
                k -= ((n + 1) / 2);
                long suffixLength = 2L * k;
                long startPos = n - suffixLength + 1;
                if (pos < startPos) {
                    return '.';
                } else {
                    return 'X';
                }
            }
        }
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine().trim();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public long nextLong() {
        return Long.parseLong(nextString());
    }

}

