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:
//package main;

import java.io.*;
import java.util.*;

public final class Main {
    BufferedReader br;
    StringTokenizer stk;
    
    public static void main(String[] args) throws Exception {
        new Main().run();
    }
    
    {
        stk = null;
        br = new BufferedReader(new InputStreamReader(System.in));
    }
    
    long mod = 998244353;
    StringBuilder res = new StringBuilder(1000005);
    void run() throws Exception {
        int n = ni();
        Pair[] pairs = new Pair[100];
        for(int i = 0; i < n; i++) {
            int num = ni() - 1;
            if(pairs[num] == null) {
                pairs[num] = new Pair(num);
            }
            pairs[num].idx.add(i);
        }
        PriorityQueue<Pair> queue = new PriorityQueue<>();
        for(int i = 0; i < 100; i++) {
            if(pairs[i] != null) {
                queue.add(pairs[i]);
            }
        }
        
        HashSet<Integer> as = new HashSet<>();
        HashSet<Integer> bs = new HashSet<>();
        List<Integer> ai  = new ArrayList<>();
        List<Integer> bi  = new ArrayList<>();
        
        while(!queue.isEmpty()) {
            Pair cur = queue.remove();
            if(cur.idx.size() == 1) {
                if(as.size() < bs.size()) {
                    as.add(cur.element);
                    ai.add(cur.idx.get(0));
                } else {
                    bs.add(cur.element);
                    bi.add(cur.idx.get(0));
                }
            } else if(cur.idx.size() == 2) {
                as.add(cur.element);
                bs.add(cur.element);
                ai.add(cur.idx.get(0));
                bi.add(cur.idx.get(1));
            } else if(cur.idx.size() == 3) {
                if(as.size() == bs.size()) {
                    for(int i = 0; i < cur.idx.size(); i++) {
                        ai.add(cur.idx.get(i));
                    }
                } else if(as.size() < bs.size()) {
                    as.add(cur.element);
                    ai.add(cur.idx.get(0));
                    bi.add(cur.idx.get(1));
                    bi.add(cur.idx.get(2));
                } else {
                    bs.add(cur.element);
                    bi.add(cur.idx.get(0));
                    ai.add(cur.idx.get(1));
                    ai.add(cur.idx.get(2));
                }
            } else {
                //as.add(cur.element);
                //bs.add(cur.element);
                if(as.size() == bs.size()) {
                    for(int i = 0; i < cur.idx.size(); i++) {
                        bi.add(cur.idx.get(i));
                    }
                } else if(as.size() < bs.size()) {
                    as.add(cur.element);
                    ai.add(cur.idx.get(0));
                    for(int i = 1; i < cur.idx.size(); i++) {
                        bi.add(cur.idx.get(i));
                    }
                } else {
                    bs.add(cur.element);
                    bi.add(cur.idx.get(0));
                    for(int i = 1; i < cur.idx.size(); i++) {
                        ai.add(cur.idx.get(i));
                    }
                }
            }
        }
        
        if(as.size() == bs.size()) {
            res.append("YES\n");
            char[] ans = new char[n];
            for(int i : ai) {
                ans[i] = 'A';
            }
            for(int i : bi) {
                ans[i] = 'B';
            }
            res.append(new String(ans)).append("\n");
            System.out.print(res);
        } else {
            System.out.println("NO");
        }
    }
    
    class Pair implements Comparable<Pair> {
        int element;
        List<Integer> idx;
        public Pair(int element) {
            this.element = element;
            idx = new ArrayList<>();
        }
        @Override
        public int compareTo(Pair p) {
            return idx.size() - p.idx.size();
        }
    }
    
    //Reader & Writer
    String nextToken() throws Exception {
        if (stk == null || !stk.hasMoreTokens())
            stk = new StringTokenizer(br.readLine(), " ");
        return stk.nextToken();
    }

    String nt() throws Exception {
        return nextToken();
    }

    int ni() throws Exception {
        return Integer.parseInt(nextToken());
    }

    long nl() throws Exception {
        return Long.parseLong(nextToken());
    }
    
    double nd() throws Exception {
        return Double.parseDouble(nextToken());
    }
    
    //Some Misc methods
    int get(int l, int r, int[] a) {
        return l == 0 ? a[r] : a[r] - a[l - 1];
    }
    
    void shuffle(int[] a) {
        Random r = new Random();
        for(int i = 0; i < a.length; i++) {
            int idx = r.nextInt(a.length);
            int temp = a[i];
            a[i] = a[idx];
            a[idx] = temp;
        }
    }
    
    void reverse(int[] a) {
        for(int i = 0, j = a.length - 1; i < j; i++, j--) {
            int temp = a[i];
            a[i] = a[j];
            a[j] = temp;
        }
    }
}