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

/**
 * gl hf
 */
public class Main {

    static class Task {
        PrintWriter out;
        MyScanner in;


        public void solve(MyScanner in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = in.nextInt();
            Map<Integer, Integer> count = new HashMap<>();
            int[] arr = new int[n];

            int num1 = 0;
            int num2 = 0;
            int num3plus = 0;

            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();

                int ct = count.getOrDefault(arr[i], 0);
                count.put(arr[i], ct + 1);
            }

            for(Map.Entry<Integer, Integer> entry : count.entrySet()) {
                int num = entry.getKey();
                int ct = entry.getValue();

                if (ct == 1) {
                    num1++;
                } else if (ct == 2) {
                    num2++;
                } else {
                    num3plus++;
                }
            }

            
            if (num1 % 2 == 1 && num3plus == 0) {
                System.out.println("NO");
                return;
            }

            boolean shouldBalanceWith3 = (num1 % 2) == 1;
            boolean lastOneToA = false;
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                int ct = count.get(arr[i]);

                switch (ct) {
                    case 1://try to balance, start with A
                        if (lastOneToA) {
                            sb.append("B");
                        } else {
                            sb.append("A");
                        }
                        lastOneToA = !lastOneToA;
                        break;
                    case 2: //dump to A get N N
                        sb.append("A");
                        break;
                    default: //3+
                        if (shouldBalanceWith3) {
                            // should balance B to have pretty
                            sb.append("B");
                            shouldBalanceWith3 = false;
                        } else {
                            sb.append("A"); //dump all to A so it will be N N
                        }
                }

            }

            System.out.println("YES");
            System.out.println(sb);

        }






























    }

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        PrintWriter out = new PrintWriter(System.out);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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;
        }
    }
}