#include <bits/stdc++.h>
using namespace std;
int const INF = numeric_limits<int>::max();
long long const LLINF = numeric_limits<long long>::max();
double EPS = 1e-9;
long long const N = 105;
long long a[N];
long long ans[N];
map<char, long long> ma;
long long cnt[2];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    ma[a[i]]++;
  }
  for (long long i = 0; i < n; i++) {
    if (ma[a[i]] == 1) {
      if (cnt[0] == cnt[1]) {
        ans[i] = 0;
        cnt[0]++;
      } else {
        ans[i] = 1;
        cnt[1]++;
      }
    } else {
      ans[i] = 0;
    }
  }
  bool flag = cnt[0] == cnt[1];
  if (cnt[0] != cnt[1]) {
    for (long long i = 0; i < n; i++) {
      if (ma[a[i]] > 2) {
        ans[i] = 1;
        cnt[1]++;
        flag = true;
        break;
      }
    }
  }
  if (flag) {
    cout << "YES" << '\n';
    for (long long i = 0; i < n; i++) {
      if (ans[i] == 0)
        cout << "A";
      else
        cout << "B";
    }
    cout << '\n';
  } else
    cout << "NO" << '\n';
  return 0;
}
