Problem: Vasya has a multiset s consisting of n integer numbers. Vasya calls some number x nice if it appears in the multiset exactly once. For example, multiset \{1, 1, 2, 3, 3, 3, 4\} contains nice numbers 2 and 4.

Vasya wants to split multiset s into two multisets a and b (one of which may be empty) in such a way that the quantity of nice numbers in multiset a would be the same as the quantity of nice numbers in multiset b (the quantity of numbers to appear exactly once in multiset a and the quantity of numbers to appear exactly once in multiset b).

Input

The first line contains a single integer n~(2 ≤ n ≤ 100).

The second line contains n integers s_1, s_2, ... s_n~(1 ≤ s_i ≤ 100) — the multiset s.

Output

If there exists no split of s to satisfy the given requirements, then print "NO" in the first line.

Otherwise print "YES" in the first line.

The second line should contain a string, consisting of n characters. i-th character should be equal to 'A' if the i-th element of multiset s goes to multiset a and 'B' if if the i-th element of multiset s goes to multiset b. Elements are numbered from 1 to n in the order they are given in the input.

If there exist multiple solutions, then print any of them.

Examples

Input

4
3 5 7 1


Output

YES
BABA


Input

3
3 5 1


Output

NO

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.util.regex.*;

public class Solution 
{
    static class InputReader
    {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream st) 
        {
          this.stream = st;
        }

        public int read() 
        {
          if (snumChars == -1)
            throw new InputMismatchException();
          if (curChar >= snumChars) 
          {
            curChar = 0;
            try 
            {
              snumChars = stream.read(buf);
            } catch (IOException e) 
            {
              throw new InputMismatchException();
            }
            if (snumChars <= 0)
              return -1;
          }
          return buf[curChar++];
        }

        public int nextInt() 
        {
          int c = read();
          while (isSpaceChar(c)) 
          {
            c = read();
          }
          int sgn = 1;
          if (c == '-') 
          {
            sgn = -1;
            c = read();
          }
          int res = 0;
          do 
          {
            res *= 10;
            res += c - '0';
            c = read();
          } while (!isSpaceChar(c));
          return res * sgn;
        }

        public long nextLong() 
        {
          int c = read();
          while (isSpaceChar(c)) 
          {
            c = read();
          }
          int sgn = 1;
          if (c == '-') 
          {
            sgn = -1;
            c = read();
          }
          long res = 0;
          do 
          {
            res *= 10;
            res += c - '0';
            c = read();
          } while (!isSpaceChar(c));
          return res * sgn;
        }

        public int[] nextIntArray(int n) 
        {
          int a[] = new int[n];
          for (int i = 0; i < n; i++) 
          {
            a[i] = nextInt();
          }
          return a;
        }

        public String readString() 
        {
          int c = read();
          while (isSpaceChar(c)) 
          {
            c = read();
          }
          StringBuilder res = new StringBuilder();
          do 
          {
            res.appendCodePoint(c);
            c = read();
          } while (!isSpaceChar(c));
          return res.toString();
        }

        public String nextLine() 
        {
          int c = read();
          while (isSpaceChar(c))
            c = read();
          StringBuilder res = new StringBuilder();
          do 
          {
            res.appendCodePoint(c);
            c = read();
          } while (!isEndOfLine(c));
          return res.toString();
        }

        public boolean isSpaceChar(int c) 
        {
          return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) 
        {
          return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static void main(String[] args) throws IOException 
    {
        InputReader in=new InputReader(System.in);
        PrintWriter w=new PrintWriter(System.out);
        int n=in.nextInt();
        int[] s=new int[n];
        int[] fr=new int[101];
        for(int i=0;i<n;i++)
        {
            s[i]=in.nextInt();
            fr[s[i]]++;
        }
        int oc=0;
        int th=0;
        for(int i=1;i<=100;i++)
        {
            if(fr[i]==1)
                oc++;
            if(fr[i]>2)
                th++;
        }
        char[] ans=new char[n];
        Arrays.fill(ans,'A');
        //w.println(oc);
        if(oc%2==0)
        {
            //int ones=oc;
            oc=oc/2;
            
            
            for(int i=1;i<=100;i++)
            {
                if(oc>0)
                {
                    if(fr[i]==1)
                    {
                        int index=-1;
                        for(int j=0;j<n;j++)
                        {
                            if(s[j]==i)
                                index=j;
                        }
                        ans[index]='B';
                        oc--;
                    }
                    
                }
            }
            /*for(int i=1;i<=100;i++)
            {
                if(tw>0)
                {
                    if(fr[i]==2)
                    {
                        int index=-1;
                        for(int j=0;j<n;j++)
                        {
                            if(s[j]==i)
                                index=j;
                        }
                        ans[index]='B';
                        tw--;
                    }
                }
            }*/
            w.println("YES");
            for(int i=0;i<n;i++)
            {
                w.print(ans[i]);
            }
            w.println();
        }
        else
        {
            oc=oc/2;
            if(th>=1)
            {
                for(int i=1;i<=100;i++)
                {
                    if(oc>0)
                    {
                        if(fr[i]==1)
                        {
                            int index=-1;
                            for(int j=0;j<n;j++)
                            {
                                if(s[j]==i)
                                    index=j;
                            }
                            ans[index]='B';
                            oc--;
                        }
                    }
                }
                for(int i=1;i<=100;i++)
                {
                    if(fr[i]>=3)
                    {
                            int index=-1;
                            for(int j=0;j<n;j++)
                            {
                                if(s[j]==i)
                                    index=j;
                            }
                            ans[index]='B';
                        break;
                    }
                }
                w.println("YES");
                for(int i=0;i<n;i++)
                {
                    w.print(ans[i]);
                }
                w.println();
            }
            else
            {
                w.println("NO");
            }
        }
        w.close();
    }
}