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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Solution {

	static InputReader in = new InputReader(System.in);
	static OutputWriter out = new OutputWriter(System.out);
	static int exp = (int) (1e9);

	public static void main(String[] args) {

		int n = in.nextInt();
		HashMap<Integer, ArrayList<Integer>> hm = new HashMap<>();

		for (int i = 0; i < n; i++) {
			int nbr = in.nextInt() - 1;
			if (hm.containsKey(nbr)) {
				hm.get(nbr).add(i);
			} else {
				hm.put(nbr, new ArrayList<>(Arrays.asList(i)));
			}
		}

		ArrayList<Integer> guar = new ArrayList<>();
		ArrayList<Integer> unguar = new ArrayList<>();

		for (Integer key : hm.keySet()) {
			if (hm.get(key).size() <= 2) {
				guar.add(key);
			} else {
				unguar.add(key);
			}
		}

		boolean isA = true;
		char[] result = new char[n];

		for (Integer value : guar) {
			ArrayList<Integer> list = hm.get(value);
			for (int i = 0; i < list.size(); i++) {
				char c = isA ? 'A' : 'B';
				result[list.get(i)] = c;
				isA = !isA;
			}
		}

		if (!isA) {
			if (unguar.size() == 0) {
				System.out.println("NO");
				return;
			} else {
				int selected = unguar.get(0);
				ArrayList<Integer> list = hm.get(selected);
				result[list.get(0)] = 'B';
				for (int i = 1; i < list.size(); i++) {
					result[list.get(i)] = 'A';
				}
				unguar.remove(0);
			}
		}

		for (Integer value : unguar) {
			ArrayList<Integer> list = hm.get(value);
			for (int i = 0; i < list.size(); i++) {
				result[list.get(i)] = 'A';
			}
		}

		System.out.println("YES");
		System.out.println(new String(result));

	}
}

class Node {

	int open;
	int close;
	int count;

	public Node() {
	}

	public Node(int open, int close, int count) {
		super();
		this.open = open;
		this.close = close;
		this.count = count;
	}

}

class OutputWriter {
	public PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void println(Object... objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

class InputReader {
	private BufferedReader reader;
	private StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String readLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public char nextChar() {
		return next().charAt(0);
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public float nextFloat() {
		return Float.parseFloat(next());
	}

}