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

/**
 * Created by IntelliJ IDEA.
 * User: Taras_Brzezinsky
 * Date: 8/7/11
 * Time: 3:11 PM
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.FileReader;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.Arrays;

public class RussianRoulette extends Thread {

    public RussianRoulette() {
        this.input = new BufferedReader(new InputStreamReader(System.in));
        this.output = new PrintWriter(System.out);
        this.setPriority(Thread.MAX_PRIORITY);
    }

    static class Solver {
        long sureNo, probableYes;
        public Solver(long n, long k) {
            sureNo = Math.max(0, n - 2 * k);
            probableYes = Math.min(n - k, k ) * 2;
            if (Math.min(sureNo & 1, probableYes)!= 0) {
                ++sureNo;
                probableYes -= 2;
            }
        }
        public char decide(long where) {
            if (where <= sureNo) {
                return '.';
            } else {
                if (where <= sureNo + probableYes) {
                    long temporary = where - sureNo;
                    return temporary % 2 == 0 ? 'X' : '.';
                } else {
                    return 'X';
                }
            }
        }
    }

    public void run() {
        try {
            long n = nextLong(), k = nextLong(), p = nextInt();
            Solver blackBox = new Solver(n, k);
            for (int i = 0; i < p; ++i) {
                output.print(blackBox.decide(nextLong()));
            }

            output.flush();
            output.close();

        } catch (Throwable e) {
            System.err.println(e.getMessage());
            System.err.println(Arrays.deepToString(e.getStackTrace()));
        }
    }


    public static void main(String[] args) {
        new RussianRoulette().start();
    }

    private String nextToken() throws IOException {
        while (tokens == null || !tokens.hasMoreTokens()) {
            tokens = new StringTokenizer(input.readLine());
        }
        return tokens.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }


    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}
