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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jenish
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CVasyaAndMultisets solver = new CVasyaAndMultisets();
        solver.solve(1, in, out);
        out.close();
    }

    static class CVasyaAndMultisets {
        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            HashSet<Integer> A = new HashSet<>();
            HashSet<Integer> B = new HashSet<>();
            int arr[] = new int[n];
            char ans[] = new char[n];
            HashMap<Integer, ArrayList<Integer>> aa = new HashMap<>();
            for (int i = 0; i < n; i++) {
                int x = in.scanInt();
                arr[i] = x;

                if (aa.containsKey(x)) {
                    aa.get(x).add(i);
                } else {
                    aa.put(x, new ArrayList<>());
                    aa.get(x).add(i);
                }
            }


            ArrayList<Integer> indexs = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                if (aa.get(arr[i]).size() == 1) {
                    indexs.add(i);
                    aa.remove(arr[i]);
                }
            }


            for (int i = 0; i < indexs.size(); i++) {
                if (i % 2 == 0) {
                    A.add(arr[indexs.get(i)]);
                    ans[indexs.get(i)] = 'A';
                } else {
                    B.add(arr[indexs.get(i)]);
                    ans[indexs.get(i)] = 'B';
                }
            }


            for (int i = 0; i < n; i++) {
                if (!aa.containsKey(arr[i])) continue;
                if (aa.get(arr[i]).size() != 1) {
                    if (A.size() == B.size()) {
                        for (int tt : aa.get(arr[i])) {
                            ans[tt] = 'A';
                        }
                    } else if (A.size() < B.size()) {
                        if (aa.get(arr[i]).size() == 2) {
                            for (int tt : aa.get(arr[i])) {
                                ans[tt] = 'A';
                            }
                        } else {
                            A.add(arr[i]);
                            ArrayList<Integer> index = aa.get(arr[i]);
                            ans[index.get(0)] = 'A';
                            for (int j = 1; j < index.size(); j++) {
                                ans[index.get(j)] = 'B';
                            }
                        }
                    } else {
                        if (aa.get(arr[i]).size() == 2) {
                            for (int tt : aa.get(arr[i])) {
                                ans[tt] = 'A';
                            }
                        } else {
                            B.add(arr[i]);
                            ArrayList<Integer> index = aa.get(arr[i]);
                            ans[index.get(0)] = 'B';
                            for (int j = 1; j < index.size(); j++) {
                                ans[index.get(j)] = 'A';
                            }
                        }
                    }
                    aa.remove(arr[i]);
                }
            }


            if (A.size() == B.size()) {
                out.println("YES");
                for (int i = 0; i < n; i++) {
                    out.print(ans[i]);
                }
            } else {
                out.println("NO");
            }
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int INDEX;
        private BufferedInputStream in;
        private int TOTAL;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (INDEX >= TOTAL) {
                INDEX = 0;
                try {
                    TOTAL = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (TOTAL <= 0) return -1;
            }
            return buf[INDEX++];
        }

        public int scanInt() {
            int I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}

