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.awt.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
public class D {
	public static void main(String[] args) throws IOException	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		long n = Long.parseLong(st.nextToken());
		long k = Long.parseLong(st.nextToken());
		int q = Integer.parseInt(st.nextToken());
		while(q-- > 0)	{
			long curr = Long.parseLong(br.readLine());
			if(n%2 == 0)	{
				long should = 0;
				if(curr % 2 == 0)	{
					should = 1 + ((n-curr)/2);
				}
				else	{
					should = n/2 + (n+1-curr)/2;
				}
				if(should <= k)
					System.out.print('X');
				else
					System.out.print('.');
			}
			else	{
				long test = curr + k;
				if(test > n)	{
					System.out.print('X');
				}
				else	{
					System.out.print('.');
				}
			}
		}
	}
}
