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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.util.*;
import java.util.StringTokenizer;

public class Tester {

	static class Print
	{
	    private final BufferedWriter bw;
	    public Print()
	    {
	        this.bw=new BufferedWriter(new OutputStreamWriter(System.out));
	    }
	    public void print(Object object)throws IOException
	    {
	        bw.append(""+object);
	    }
	    public void println(Object object)throws IOException
	    {
	        print(object);
	        bw.append("\n");
	    }
	    public void close()throws IOException
	    {
	        bw.close();
	    }
	}
	
	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
	
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		
		solveQ3();
		
	}

	private static void solveQ3() {
		// TODO Auto-generated method stub
		
		FastReader sc = new FastReader();
		int n = sc.nextInt();
		
		int b[] = new int[n];
		int a[] = new int[101];
		
		for(int i=0; i<n; i++)
		{
			b[i] = sc.nextInt();
			a[b[i]]++;
		}
		
		int c=0;
		int c2=0;
		for(int i=1; i<=100; i++) {
			if(a[i] == 1)
				c++;
			if(a[i]>2) {
				c2++;
			}
		}
		
		if(c%2 == 1) {
			if(c2 == 0)
				System.out.println("NO");
			else {
				System.out.println("YES");
				int flag = 0;
				int used = 0;
				int number = 0;
				char symbol = 'A';
				for(int i=0; i<n; i++) {
					if(a[b[i]] == 1) {
						if(flag == 0) {
							System.out.print("A");
							flag = 1;
						}
						else
						{
							System.out.print("B");
							flag = 0;
						}
					}
					else if(used == 0 && a[b[i]] > 2) {
						if(flag == 0) {
							System.out.print("A");
							flag = 1;
							symbol = 'B';
						}
						else
						{
							System.out.print("B");
							flag = 0;
							symbol = 'A';
						}
						number = b[i];
						used = 1;
					}
					else if(used == 1 && b[i]==number) {
						System.out.print(symbol);
					}
					else {
						System.out.print("A");
					}
				}
		
			}
		}
		else{
			System.out.println("YES");
			int flag = 0;
			for(int i=0; i<n; i++) {
				if(a[b[i]] == 1) {
					if(flag == 0) {
						System.out.print("A");
						flag = 1;
					}
					else
					{
						System.out.print("B");
						flag = 0;
					}
				}
				else {
					System.out.print("A");
				}
			}
			System.out.println();
		}
		
	}

	private static void solveQ2() {
		// TODO Auto-generated method stub
		
		FastReader sc = new FastReader();
		
		long l = sc.nextLong();
		long r = sc.nextLong();
		
		System.out.println("YES");
		for(long i=l; i<r; i+=2) {
			System.out.println(i + " " + (i+1));
		}
		
	}

	private static void solveQ1() {
		// TODO Auto-generated method stub
		
		FastReader sc = new FastReader();
		
		int t = sc.nextInt();
		
		while(t-->0) {
			
			String s = sc.next();
			
			int c1 = 0;
			int c2 = 0;
			int c3 = 0;
			
			int i1 = -1;
			int i2 = -1;
			int i3 = -1;
			
			for(int i=0; i<s.length(); i++) {
				
				if(s.charAt(i)>='a' & s.charAt(i)<='z') {
					c1++;
					i1 = i;
				}
				else if(s.charAt(i)>='A' & s.charAt(i)<='Z') {
					c2++;
					i2 = i;
				}
				else {
					c3++;
					i3 = i;
				}
			}
			
			if(c1 > 0 && c2 >0 && c3 >0) {
				System.out.println(s);
				continue;
			}
			if((c1 == 0 && c2 == 0)) {
				System.out.print('A');
				System.out.print('a');
				System.out.println(s.substring(2, s.length()));
				continue;
			}
			if((c3 == 0 && c2 == 0)) {
				System.out.print('A');
				System.out.print('0');
				System.out.println(s.substring(2, s.length()));
				continue;
			}
			if((c1 == 0 && c3 == 0)) {
				System.out.print('0');
				System.out.print('a');
				System.out.println(s.substring(2, s.length()));
				continue;
			}
			
			if(c1 == 0) {
				if(c2 > 1) {
					System.out.print(s.substring(0,i2));
					System.out.print('a');
					System.out.println(s.substring(i2+1,s.length()));
				}
				else {
					System.out.print(s.substring(0,i3));
					System.out.print('a');
					System.out.println(s.substring(i3+1,s.length()));
				}
				continue;
			}
			
			if(c2 == 0) {
				if(c1 > 1) {
					System.out.print(s.substring(0,i1));
					System.out.print('A');
					System.out.println(s.substring(i1+1,s.length()));
				}
				else {
					System.out.print(s.substring(0,i3));
					System.out.print('A');
					System.out.println(s.substring(i3+1,s.length()));
				}
				continue;
			}
			
			if(c3 == 0) {
				if(c1 > 1) {
					System.out.print(s.substring(0,i1));
					System.out.print('0');
					System.out.println(s.substring(i1+1,s.length()));
				}
				else {
					System.out.print(s.substring(0,i2));
					System.out.print('0');
					System.out.println(s.substring(i2+1,s.length()));
				}
				continue;
			}
		}
		
	}

	
}