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


public class C
{
   public static void main(String[] args)
   {
      new C(new FastScanner());
   }

   public C(FastScanner in)
   {
      long N = in.nextLong();
      long K = in.nextLong();
      int q = in.nextInt();
   
      

      StringBuilder sb = new StringBuilder();
      while (q-->0)
      {
         long v = in.nextLong();
         long left = N-v;
      
         if (K == 0)
         {
            sb.append('.');
            continue;
         }

         if (K == N)
         {
            sb.append('X');
            continue;
         }

         if ((N%2) == 0)
         {
            if ((left%2) == 0)
            {
               long d = left/2;
               if (d <= (K-1))
                  sb.append('X');
               else
                  sb.append('.');
            }
            else
            {
               long d = left/2;
               long NN = N/2;

               long KK = K-NN-1;

               if (d <= KK)
                  sb.append('X');
               else
                  sb.append('.');
            }
         }
         else // odd
         {
            if (v == N)
            {
               sb.append('X');
               continue;
            }

            if ((left%2) == 1)
            {
               long d = (left+1)/2;
               if (d <= (K-1))
               {
                  sb.append('X');
               }
               else
               {
                  sb.append('.');
               }
            }
            else
            {
               long d = left/2;
               long NN = 1+N/2;

               long KK = K-NN;

               if (d <= KK)
               {
                  sb.append('X');
               }
               else
               {
                  sb.append('.');
               }
            }
         }
      }
      System.out.println(sb);
   }
}


class FastScanner{
    int nextInt(){
        try{
            int c=System.in.read();
            if(c==-1) return c;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=System.in.read();
                if(c==-1) return c;
            }
            if(c=='-') return -nextInt();
            int res=0;
            do{
                res*=10;
                res+=c-'0';
                c=System.in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }
    
    long nextLong(){
        try{
            int c=System.in.read();
            if(c==-1) return -1;
            while(c!='-'&&(c<'0'||'9'<c)){
                c=System.in.read();
                if(c==-1) return -1;
            }
            if(c=='-') return -nextLong();
            long res=0;
            do{
                res*=10;
                res+=c-'0';
                c=System.in.read();
            }while('0'<=c&&c<='9');
            return res;
        }catch(Exception e){
            return -1;
        }
    }
    
    double nextDouble(){
        return Double.parseDouble(next());
    }
    
    String next(){
        try{
            StringBuilder res=new StringBuilder("");
            int c=System.in.read();
            while(Character.isWhitespace(c))
                c=System.in.read();
            do{
                res.append((char)c);
            }while(!Character.isWhitespace(c=System.in.read()));
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }
    
    String nextLine(){
        try{
            StringBuilder res=new StringBuilder("");
            int c=System.in.read();
            while(c=='\r'||c=='\n')
                c=System.in.read();
            do{
                res.append((char)c);
                c=System.in.read();
            }while(c!='\r'&&c!='\n');
            return res.toString();
        }catch(Exception e){
            return null;
        }
    }
}
