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

public class C {

	public Object solve() {
		int N = sc.nextInt();
		int [] A = sc.nextInts();

		Counter<Integer> K = new Counter<>();
		for (int a : A)
			K.inc(a);

		Counter<Integer> R1 = new Counter<>(), R2 = new Counter<>(), R = R1;
		for (int j : K.keySet().toArray(new Integer[0]))
			if (K.get(j) == 1) {
				R.inc(j);
				K.dec(j);
				R = R == R1 ? R2 : R1;
			}

		if (R1.size() != R2.size()) {
			boolean OK = false;
			for (int j : K.keySet().toArray(new Integer[0]))
				if (K.get(j) >= 3) {
					long x = K.get(j);
					R2.inc(j);
					R1.inc(j, x-1);
					K.dec(j, x);
					OK = true;
					break;
				}
			if (!OK)
				exit("NO");
		}

		for (int j : K.keySet().toArray(new Integer[0]))
			R1.inc(j, K.get(j));

		char [] res = new char [N];
		for (int i : rep(N))
			if (R1.get(A[i]) > 0) {
				res[i] = 'A';
				R1.dec(A[i]);
			}
			else
				res[i] = 'B';

		print("YES");
		return exit(new String(res));
	}

	private static final boolean ONE_TEST_CASE = true;

	private static void init() {
	}

	private static Iterable<Integer> rep (int N) { return rep(0, N); }
	private static Iterable<Integer> rep (final int S, final int T) { return new Iterable<Integer>() { public Iterator<Integer> iterator() { return S < T ? java.util.stream.IntStream.range(S,  T).iterator() : Collections.emptyIterator(); } }; }
	////////////////////////////////////////////////////////////////////////////////////
	private interface AbstractCounter<K> extends Map<K, Long> {
		default boolean safeContainsKey(Object key) { if (!isEmpty()) keySet().iterator().next().getClass().cast(key); return containsKey(key); }
		default void dec (K key) { dec(key, 1); }
		default void dec (K key, long value) { inc(key, -value); }
		default void inc (K key) { inc(key, 1); }
		default void inc (K key, long value) { put(key, get(key) + value); }
	}
	private static class Counter<K> extends TreeMap<K, Long> implements AbstractCounter<K> {
		private static final long serialVersionUID = 1L;
		public Long get (Object key) { return safeContainsKey(key) ? super.get(key) : 0L; }
		public Long put (K key, Long value) {
			long res = get(key);
			if (value != 0)
				super.put(key, value);
			else
				remove(key);
			return res;
		}
	}
	////////////////////////////////////////////////////////////////////////////////////
	private static IOUtils.MyScanner sc = new IOUtils.MyScanner();
	private static Object print (Object o, Object ... A) { IOUtils.print(o, A); return null; }
	private static Object exit (Object o, Object ... A) { print(o, A); IOUtils.exit(); return null; }
	private static class IOUtils {
		public static class MyScanner {
			public String next() { newLine(); return line[index++]; }
			public int nextInt() { return Integer.parseInt(next()); }
			public String nextLine() { line = null; return readLine(); }
			public String [] nextStrings() { return split(nextLine()); }
			public int[] nextInts() { return nextStream().mapToInt(Integer::parseInt).toArray(); }
			//////////////////////////////////////////////
			private boolean eol() { return index == line.length; }
			private String readLine() {
				try {
					return r.readLine();
				} catch (Exception e) {
					throw new Error (e);
				}
			}
			private final java.io.BufferedReader r;
			private MyScanner () { this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in))); }
			private MyScanner (java.io.BufferedReader r) {
				try {
					this.r = r;
					while (!r.ready())
						Thread.sleep(1);
					start();
				} catch (Exception e) {
					throw new Error(e);
				}
			}
			private String [] line;
			private int index;
			private void newLine() {
				if (line == null || eol()) {
					line = split(readLine());
					index = 0;
				}
			}
			private java.util.stream.Stream<String> nextStream() { return java.util.Arrays.stream(nextStrings()); }
			private String [] split(String s) { return s.length() > 0 ? s.split(" ") : new String [0]; }
		}
		private static String build(Object o, Object ... A) { return buildDelim(" ", o, A); }
		private static String buildDelim(String delim, Object o, Object ... A) {
			StringBuilder b = new StringBuilder();
			append(b, o, delim);
			for (Object p : A)
				append(b, p, delim);
			return b.substring(delim.length());
		}
		//////////////////////////////////////////////////////////////////////////////////
		private static final java.text.DecimalFormat formatter = new java.text.DecimalFormat("#.#########");
		private static void start() { if (t == 0) t = millis(); }
		private static void append(java.util.function.Consumer<Object> f, java.util.function.Consumer<Object> g, final Object o) {
			if (o.getClass().isArray()) {
				int len = java.lang.reflect.Array.getLength(o);
				for (int i = 0; i < len; ++i)
					f.accept(java.lang.reflect.Array.get(o, i));
			}
			else if (o instanceof Iterable<?>)
				((Iterable<?>)o).forEach(f::accept);
			else
				g.accept(o instanceof Double ? formatter.format(o) : o);
		}
		private static void append(final StringBuilder b, Object o, final String delim) {
			append(x -> { append(b, x, delim); }, x -> b.append(delim).append(x), o);
		}
		private static java.io.PrintWriter pw = new java.io.PrintWriter(System.out);
		private static Object print(Object o, Object ... A) { pw.println(build(o, A)); return null; }
		private static void err(Object o, Object ... A) { System.err.println(build(o, A)); }
		private static boolean PRINT;
		private static void write(Object o) {
			err(o, '(', time(), ')');
			if (PRINT)
				pw.println(o);
		}
		private static void exit() {
			IOUtils.pw.close();
			System.out.flush();
			err("------------------");
			err(time());
			System.exit(0);
		}
		private static long t;
		private static long millis() { return System.currentTimeMillis(); }
		private static String time() { return "Time: " + (millis() - t) / 1000.0; }
		private static void run(int N) {
			try { PRINT = System.getProperties().containsKey("PRINT"); }
			catch (Throwable t) {}

			for (int n = 1; n <= N; ++n) {
				Object res = new C().solve();
				if (res != null)
					write("Case #" + n + ": " + build(res));
			}
			exit();
		}
	}
	public static void main(String[] args) {
		init();
		int N = ONE_TEST_CASE ? 1 : sc.nextInt();
		IOUtils.run(N);
	}
}