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.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

	public Main() throws FileNotFoundException {

//		File file = Paths.get("input.txt").toFile();
//		if (file.exists()) {
//			System.setIn(new FileInputStream(file));
//		}
		long t = System.currentTimeMillis();

		InputReader reader = new InputReader();

		int n = reader.nextInt();
		int[] a = new int[n];
		int[] aa=new int[n];
		int[] cnt = new int[101];
		for (int i = 0; i < n; i++) {
			a[i] = reader.nextInt();
			cnt[a[i]]++;
			aa[i]=a[i];
		}
		
		Arrays.sort(aa);
		//System.out.println(Arrays.toString(aa));
		

		int c = 0;
		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= 100; i++) {
			if (cnt[i] == 1) {
				c++;
				set.add(i);
			}
		}
		
		//System.out.println(set);

		StringBuilder sb = new StringBuilder();
		if (c == 0) {
			for (int i = 0; i < n; i++) {
				sb.append("A");
			}
			System.out.println("YES");
			System.out.println(sb.toString());
		} else if (c % 2 == 0) {
			int cc = c / 2;
			for (int i = 0; i < n; i++) {
				if (set.contains(a[i])) {
					if (cc > 0) {
						cc--;
						sb.append("A");
					} else {
						sb.append("B");
					}
				} else {
					sb.append("A");
				}
			}
			System.out.println("YES");
			System.out.println(sb.toString());
		} else {

			int pos = -1;

			for (int i = 0; i <= 100; i++) {
				if (cnt[i] > 2) {
					pos = i;
					break;
				}
			}
			if (pos == -1) {
				System.out.println("NO");

			} else {
				boolean ok=false;
				int cc = c / 2;
				for (int i = 0; i < n; i++) {
					if (set.contains(a[i])) {
						if (cc > 0) {
							cc--;
							sb.append("A");
						} else {
							sb.append("B");
						}
					} else {
						if (a[i] == pos&&!ok) {
							ok=true;
							sb.append("A");
						} else {
							sb.append("B");
						}
					}
				}
				System.out.println("YES");
				System.out.println(sb.toString());
			}

		}

	}

	static class InputReader {
		private byte[] buf = new byte[16384];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

		public long[] nextLongArray(int n) {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}
			return arr;
		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}

	public static void main(String[] args) throws FileNotFoundException {
		new Main();
	}

}