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.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Main {

    private static BufferedReader br;
    private static PrintWriter pw;
    private static StringTokenizer stk = new StringTokenizer("");

    public static void main(String[] args) {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(System.out);
        (new Main()).solve();
        pw.close();
    }

    private void nline() {
        while (!stk.hasMoreElements()) {
            stk = new StringTokenizer(rline());
        }
    }

    private String rline() {
        try {
            return br.readLine();
        } catch (IOException e) {
            throw new RuntimeException("rline");
        }
    }

    private boolean isready() {
        try {
            return br.ready();
        } catch (IOException e) {
            throw new RuntimeException("isready");
        }
    }

    private String ntok() {
        nline();
        return stk.nextToken();
    }

    private Integer ni() {
        return Integer.valueOf(ntok());
    }

    private Double nd() {
        return Double.valueOf(ntok());
    }

    private Long nl() {
        return Long.valueOf(ntok());
    }

    private BigInteger nBI() {
        return new BigInteger(ntok());
    }

    int[][] a = null;
    int n = 0;
    int m = 0;

    int[] cyc = new int[1000];

    int dfs(int w, int ff, int[] u) {
        for (int i = 0; i < n; i++)
            if (i != ff && i != w && a[w][i] > 0) {
                if (u[i] == 1) {
                    cyc[i] = 1;
                    cyc[w] = 1;
                    return i;
                }
                u[i] = 1;
                int xx = dfs(i, w, u);
                if (xx != -1) {
                    if (xx == -2)
                        return -2;
                    if (xx == w)
                        return -2;
                    cyc[w] = 1;
                    return xx;
                }
            }
        return -1;
    }

    void dfs2(int w, int[] u) {
        for (int i = 0; i < n; i++)
            if (u[i] == 0 && a[w][i] != 0) {
                u[i] = 1;
                dfs2(i, u);
            }
    }

    boolean calc(long n, long k, long x) {
        if (k==0)
            return false;
        long rx = n - x - 1;
        long p = n - k;
        if (p==k) {
            return rx%2==0;
        }
        if (p < k) {
            long t = k - p;
            if (rx < t)
                return true;
            rx -= t;
            return rx % 2 == 0;
        }
        long r = p - k;
        if (r % 2 != 0) {
            rx -= 1;
            k--;
            if (rx < 0)
                return true;
        }
        long ar = rx / 2;
        if (ar < k)
            return rx % 2 == 0;
        return false;
    }

    private void solve() {
        long n = nl();
        long k = nl();
        long r = n - k;
        int p = ni();
        for (int i = 0; i < p; i++) {
            long a = nl()-1;
            pw.print(calc(n,k,a)?"X":".");
        }
    }
}
