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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
long long ext_gcd(long long A, long long B, long long* X, long long* Y) {
  long long x2, y2, x1, y1, x, y, r2, r1, q, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = A, r1 = B; r1 != 0;
       r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y) {
    q = r2 / r1;
    r = r2 % r1;
    x = x2 - (q * x1);
    y = y2 - (q * y1);
  }
  *X = x2;
  *Y = y2;
  return r2;
}
inline long long modInv(long long a, long long m) {
  long long x, y;
  ext_gcd(a, m, &x, &y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
int dir4[4][2] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
const long long inf = 100000000000000LL;
const long long mod = 1000000007;
const double pi = 2 * acos(0.0);
const double eps = 1e-11;
const int Size = 300505;
int N;
int Map[105];
int A[105];
vector<int> POS[105];
vector<int> G1, GX, G2;
vector<int> mset1, mset2;
char res[105];
bool solve() {
  int cnt1 = 0, cntx = 0;
  for (long long s = (1); s <= (100); ++s) {
    if (Map[s] == 1) {
      cnt1++;
      G1.push_back(s);
    } else if (Map[s] == 2) {
      G2.push_back(s);
    } else if (Map[s] > 2) {
      cntx++;
      GX.push_back(s);
    }
  }
  for (long long i = (0); i <= (cnt1 / 2 - 1); ++i) {
    int v = G1.back();
    mset1.push_back(POS[v][0]);
    G1.pop_back();
  }
  for (long long i = (0); i <= (cnt1 / 2 - 1); ++i) {
    int v = G1.back();
    mset2.push_back(POS[v][0]);
    G1.pop_back();
  }
  if (cnt1 % 2 == 1) {
    int v = G1.back();
    mset1.push_back(POS[v][0]);
    G1.pop_back();
    if (cntx == 0) return false;
    int xx = GX.back();
    GX.pop_back();
    mset2.push_back(POS[xx][0]);
    for (long long i = (1); i <= (((long long)(POS[xx]).size()) - 1); ++i) {
      mset1.push_back(POS[xx][i]);
    }
  }
  for (long long i = (0); i <= (((long long)(G2).size()) - 1); ++i) {
    int v = G2[i];
    for (long long j = (0); j <= (((long long)(POS[v]).size()) - 1); ++j) {
      mset1.push_back(POS[v][j]);
    }
  }
  for (long long i = (0); i <= (((long long)(GX).size()) - 1); ++i) {
    int v = GX[i];
    for (long long j = (0); j <= (((long long)(POS[v]).size()) - 1); ++j) {
      mset1.push_back(POS[v][j]);
    }
  }
  for (long long i = (0); i <= (((long long)(mset1).size()) - 1); ++i) {
    int p = mset1[i];
    res[p] = 'A';
  }
  for (long long i = (0); i <= (((long long)(mset2).size()) - 1); ++i) {
    int p = mset2[i];
    res[p] = 'B';
  }
  if (((long long)(mset1).size()) + ((long long)(mset2).size()) != N)
    return false;
  res[N] = '\0';
  printf("YES\n");
  printf("%s\n", res);
  return true;
}
int main() {
  scanf("%d", &N);
  for (long long i = (0); i <= (N - 1); ++i) {
    scanf("%d", &A[i]);
    Map[A[i]]++;
    POS[A[i]].push_back(i);
  }
  if (!solve()) {
    printf("NO\n");
  }
  return 0;
}