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.*;

public class Main {
    public static void main(String args[]) throws Exception {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.main(in, out);
        out.close();
    }
}

class Task {
    final int maxn = 411;
    boolean[][] g = new boolean[maxn][maxn];
    boolean[] vis = new boolean[maxn];

    int cnt = 0;

    char run(long n, long k, long x) {
        if (k == 0)
            return '.';
        if (n == k)
            return 'X';
        if (x == n)
            return 'X';

        int p = (int) (x & 1);
        long t = 0, half;
        if ((n & 1) == 0) {
            t = (n - x + 2) >> 1;
            half = n >> 1;
            if (p == 0) {
                if (t <= k)
                    return 'X';
                else
                    return '.';
            } else {
                if (k <= half)
                    return '.';
                long r = (n - x + 1) >> 1;
                if (r + half <= k)
                    return 'X';
                else
                    return '.';
            }
        } else {
            t = (n - x + 3) >> 1;
            half = (n + 1) >> 1;
            if (p == 0) {
                if (t <= k)
                    return 'X';
                else
                    return '.';
            } else {
                if (k <= half)
                    return '.';
                long r = (n - x) >> 1;
                if (r + half <= k)
                    return 'X';
                else
                    return '.';
            }
        }
        // return '.';
    }

    void main(InputReader in, PrintWriter out) throws Exception {
        long n, k, x;
        int p;
        n = in.nextLong();
        k = in.nextLong();
        p = in.nextInt();
        for (int i = 0; i < p; ++i) {
            x = in.nextLong();
            out.print(run(n, k, x));
        }
    }
}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

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

    String next() {
        if (!hasNext())
            throw new RuntimeException();
        return tokenizer.nextToken();
    }

    boolean hasNext() {
        while (tokenizer == null || !tokenizer.hasMoreTokens())
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (Exception e) {
                return false;
            }
        return true;
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }
}