#include <bits/stdc++.h>
using namespace std;
long long dx[] = {1, -1, 0, 0, -1, -1, 1, 1};
long long dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
long long fast_power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long fast_gcd(long long a, long long b) {
  while (b) {
    auto temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
long long n;
long long mem[100][100][100];
vector<long long> s(100);
long long calc(long long pos, map<long long, long long> a,
               map<long long, long long> b) {
  if (pos == n) {
    long long x = 0, y = 0;
    for (auto i : a) {
      if (i.second == 1 && i.second != 0) x++;
    }
    for (auto i : b) {
      if (i.second == 1 && i.second != 0) y++;
    }
    if (x == y) return 0;
    return 1e18;
  }
  long long x = 0, y = 0;
  for (auto i : a) {
    if (i.second == 1 && i.second != 0) x++;
  }
  for (auto i : b) {
    if (i.second == 1 && i.second != 0) y++;
  }
  long long &ret = mem[pos][x][y];
  if (~ret) return ret;
  a[s[pos]]++;
  long long take1 = calc(pos + 1, a, b);
  a[s[pos]]--;
  b[s[pos]]++;
  long long take2 = calc(pos + 1, a, b);
  b[s[pos]]--;
  return ret = min(take1, take2);
}
void print(long long pos, map<long long, long long> a,
           map<long long, long long> b) {
  if (pos == n) return;
  long long ret = calc(pos, a, b);
  a[s[pos]]++;
  long long take1 = calc(pos + 1, a, b);
  a[s[pos]]--;
  b[s[pos]]++;
  long long take2 = calc(pos + 1, a, b);
  b[s[pos]]--;
  if (ret == take1) {
    cout << "A";
    a[s[pos]]++;
    return print(pos + 1, a, b);
  } else {
    cout << "B";
    b[s[pos]]++;
    return print(pos + 1, a, b);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> s[i];
  map<long long, long long> a, b;
  memset(mem, -1, sizeof(mem));
  long long can = calc(0, a, b);
  if (can == 1e18) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << '\n';
  print(0, a, b);
  return 0;
}
