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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class test6 {

	public static final int mod=1000000007;
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
		//Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		String[] ipp=sc.readLine().split(" ");
		int n=Integer.parseInt(ipp[0]);
		int[] arr=new int[n];
		String[] ip=sc.readLine().split(" ");
		Map<Integer,List<Integer>> mp=new HashMap<>();	
		Map<Integer,Integer> mp2=new HashMap<>();	
		char[] ans=new char[n];
		for(int i=0;i<n;i++) {
			arr[i]=Integer.parseInt(ip[i]);
			if(!mp.containsKey(arr[i])) {
				mp.put(arr[i], new LinkedList<>());
			}
			mp.get(arr[i]).add(i);
			mp2.put(arr[i], mp.get(arr[i]).size());
		}
		int a=0,b=0;
		for(Map.Entry<Integer,Integer> en : entriesSortedByValues(mp2)) {
			int ele=en.getKey();
			int size=en.getValue();
			if(size==1) {
				if(a>b) {
					b++;
					ans[mp.get(ele).remove(0)]='B';
				} else {
					a++;
					ans[mp.get(ele).remove(0)]='A';
				}
			} else if(size==2) {
				for(int idx:mp.get(ele)) ans[idx]='A';
			} else {
				if(a==b) {
					for(int idx:mp.get(ele)) ans[idx]='A';					
				} else {
					if(a>b) {
						b++;
						ans[mp.get(ele).remove(0)]='B';
						for(int idx:mp.get(ele)) ans[idx]='A';											
					} else {
						a++;
						ans[mp.get(ele).remove(0)]='A';
						for(int idx:mp.get(ele)) ans[idx]='B';					
					}
				}
			}
		}
		
		if(a==b) {
			out.println("YES");
			out.println(new String(ans));
		} else {
			out.println("NO");
		}
		
		out.flush();
		out.close();
	}
	
	static <K,V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map) {
        SortedSet<Map.Entry<K,V>> sortedEntries = new TreeSet<Map.Entry<K,V>>(
            new Comparator<Map.Entry<K,V>>() {
                @Override public int compare(Map.Entry<K,V> e1, Map.Entry<K,V> e2) {
                    int res = e1.getValue().compareTo(e2.getValue()); //minus sign for descending sort
                    return res != 0 ? res : 1; // Special fix to preserve items with equal values
                }
            }
        );
        sortedEntries.addAll(map.entrySet());
        return sortedEntries;
    }
		
	public static int first(int arr[], int low, int high, int x) 
    { 
        if (high >= low) { 
            int mid = low + (high - low) / 2; 
            if ((mid == 0 || x > arr[mid - 1]) && arr[mid] == x) 
                return mid; 
            else if (x > arr[mid]) 
                return first(arr, (mid + 1), high, x); 
            else
                return first(arr, low, (mid - 1), x); 
        } 
        return -1; 
    }
	
	public static int gcd(int A, int B) {
	    if(B==0)
	        return A;
	    else
	        return gcd(B, A % B);
	}
	
	public static class Pair{
		int l=0;
		int r=0;
		Pair(int a,int b){
			l=a;
			r=b;
		}		
	}
	
}

