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

#include <iostream>
#include <cstdio>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <iterator>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define x0 abc
#define y0 ABC
#define x1 abcd
#define y1 ABCD
#define xn abcde
#define yn ABCDE

#define l_b lower_bound
#define u_b upper_bound

#define in insert
#define er erase

#define fi first
#define se second
#define m_p make_pair

#define p_b push_back
#define po_b pop_back

#define uns unsigned

#define fbo find_by_order
#define ook order_of_key

#define ld long double
#define ll long long

#define cont continue
#define re return

#define MAXLL 9000000000000000000LL
#define MAXINT 2000000000

#define MINLL -9000000000000000000LL
#define MININT -2000000000

#define pi acos(-1.)

#define endl '\n'

#define OUT cout << "-------" << endl;

using namespace std;

using namespace __gnu_pbds;

typedef tree <int, null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

ll n, i, k, q, nom;

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(0);
    cin.tie(0);

    cin >> n >> k >> q;

    if (k == 0) {
        while (q--) cout << "." << endl;

        re 0;
    }

    if (n % 2 == 0) {
        if (k * 2 >= n) {
            while (q--) {
                cin >> nom;

                if (nom <= (n - k) * 2) {
                    if (nom % 2 != 0)
                    cout << ".";
                    else cout << "X";
                }
                else cout << "X";
            }
        }
        else {
            while (q--) {
                cin >> nom;

                if (nom < n - (k - 1) * 2)
                cout << ".";
                else if (nom == n - (k - 1) * 2)
                cout << "X";
                else if ((nom - (n - (k - 1) * 2)) % 2 != 0)
                cout << ".";
                else cout << "X";
            }
        }

        cout << endl;
    }
    else {
        if (k * 2 >= n) {
            while (q--) {
                cin >> nom;

                if (nom <= (n - k) * 2) {
                    if (nom % 2 != 0)
                    cout << ".";
                    else cout << "X";
                }
                else cout << "X";
            }
        }
        else {
            while (q--) {
                cin >> nom;

                if (nom == n) {
                    cout << "X";

                    cont;
                }

                if (nom < n - (k - 1) * 2 + 1)
                cout << ".";
                else if (nom == n - (k - 1) * 2 + 1)
                cout << "X";
                else if ((nom - (n - (k - 1) * 2 + 1)) % 2 != 0)
                cout << ".";
                else cout << "X";
            }
        }

        cout << endl;
    }

    re 0;
}
