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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;

public class Main
{
    StreamTokenizer in;
       PrintWriter out;
       
    public static void main(String[] args) throws IOException
   {
      new Main().run();
   }
   int nextInt() throws IOException
   {
      in.nextToken();
      return (int)in.nval;
   }
   
   long nextLong() throws IOException
   {
      in.nextToken();
      return (long)in.nval;
   }
   
   double nextDouble() throws IOException
   {
      in.nextToken();
      return (double)in.nval;
   }
   
   String nextString() throws IOException{
       in.nextToken();
       return (String)in.sval;
   }
   
   void run() throws IOException
   {
      in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
      out = new PrintWriter(new OutputStreamWriter(System.out));
      solve();
      out.flush();
   }
   
   boolean check(long x, long y, long s){
       if (x%2==0){
           long r1 = x / 2;
           long r2 = y - r1;
           if (s%2==0){
               long l = s / 2;
               if (l+y<=r1){
                   return true;
               } else return false;
           } else {
               long l = (s + 1) / 2;
               if (l+r2<=r1){
                   return true;
               } else {
                   return false;
               }
           }
       } else {
           if (2*y>x){
               long t = x - y;
               if (s%2==1 && (s+1)/2<=t){
                   return true;
               } else return false;
           } else {
               if (y%2==0){
                   if (s+y<=x){
                       return true;
                   } else return false;
               } else {
                   long t = x - y + 1;
                   if (s<=t && s!=t-1){
                       return true;
                   } else return false;
//                 if (s%2==1 && (s+2*y)>x){
//                     return false;
//                 } else return true;
               }
           }
       }
       //return true;
   }
   
   void solve() throws IOException
   {
       long n = nextLong();
       long k = nextLong();
       int p = nextInt();
       for (int i=0; i<p; i++){
           long h = nextLong();
           boolean r = check(n, k, h);
           if (r) {
               out.print('.');
           } else {
               out.print('X');
           }
       }
//     int n = nextInt();
//     long x = 0;
//     for (int i=0; i<n; i++){
//         long h = nextLong();
//         x += (h - 1) * (i+1);
//     }
//     x += n;
//     out.print(x);
   }
}