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.Arrays;
import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.FilterInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        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();

            HashMap<Integer, ArrayList<Integer>> map = new HashMap<>();
            for (int i = 0; i < n; i++) {
                int tt = in.scanInt();
                if (!map.containsKey(tt)) map.put(tt, new ArrayList());
                map.get(tt).add(i);
            }
            pair[] tt = new pair[map.size()];
            int tl = 0;
            char[] ans = new char[n];
            for (int i : map.keySet()) tt[tl++] = new pair(map.get(i));
            Arrays.sort(tt);
            int aa = 0;
            int bb = 0;
            for (int i = 0; i < tl; i++) {
                if (tt[i].arrayList.size() == 1) {
                    if (aa >= bb) {
                        bb++;
                        for (int j : tt[i].arrayList) ans[j] = 'B';
                    } else {
                        aa++;
                        for (int j : tt[i].arrayList) ans[j] = 'A';
                    }
                } else if (tt[i].arrayList.size() == 2) {
                    for (int j : tt[i].arrayList) ans[j] = 'A';
                } else if (tt[i].arrayList.size() == 3) {
                    if (aa > bb) {
                        bb++;
                        ans[tt[i].arrayList.get(0)] = 'B';
                        ans[tt[i].arrayList.get(1)] = 'A';
                        ans[tt[i].arrayList.get(2)] = 'A';
                    } else if (aa < bb) {
                        aa++;
                        ans[tt[i].arrayList.get(0)] = 'A';
                        ans[tt[i].arrayList.get(1)] = 'B';
                        ans[tt[i].arrayList.get(2)] = 'B';
                    } else {
                        ans[tt[i].arrayList.get(0)] = 'A';
                        ans[tt[i].arrayList.get(1)] = 'A';
                        ans[tt[i].arrayList.get(2)] = 'A';
                    }
                } else {
                    if (aa > bb) {
                        bb++;
                        for (int j : tt[i].arrayList) ans[j] = 'A';
                        ans[tt[i].arrayList.get(0)] = 'B';
                    } else if (bb > aa) {
                        aa++;
                        for (int j : tt[i].arrayList) ans[j] = 'B';
                        ans[tt[i].arrayList.get(0)] = 'A';
                    } else if (aa == bb) {
                        for (int j : tt[i].arrayList) ans[j] = 'A';
                    }
                }
            }
            if (aa == bb) {
                out.println("YES");
                out.println(new String(ans));
            } else {
                out.println("NO");
            }


        }

        class pair implements Comparable<pair> {
            ArrayList<Integer> arrayList;

            public pair(ArrayList<Integer> arrayList) {
                this.arrayList = arrayList;
            }

            public int compareTo(pair o) {
                return this.arrayList.size() - o.arrayList.size();
            }

        }

    }

    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 integer = 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') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

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

    }
}

