#include <bits/stdc++.h>
using namespace std;
const long double pi = acos((long double)-1.0);
const double eps = (double)1e-9;
const int inf = (int)1e9 + 7;
const int fastio = []() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  return 0;
}();
int main(void) {
  int n, k = 0;
  cin >> n;
  int cnt[101] = {
      0,
  };
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  int ans = 0;
  for (int i = 0; i < 101; i++) {
    if (cnt[i] == 1) k++;
    if (cnt[i] > 2) ans = 1;
  }
  if (k % 2 == 0) {
    cout << "YES" << '\n';
    int c = 0;
    for (int i = 0; i < n; i++) {
      if (cnt[a[i]] == 1) {
        if (c >= k / 2) {
          cout << "B";
        } else
          cout << "A";
        c++;
      } else
        cout << "A";
    }
  } else if (ans) {
    cout << "YES" << '\n';
    int c = 0;
    int res = 1;
    for (int i = 0; i < n; i++) {
      if (cnt[a[i]] == 1) {
        if (c > k / 2) {
          cout << "B";
        } else
          cout << "A";
        c++;
      } else if (cnt[a[i]] > 2)
        cout << (res ? "B" : "A"), res = 0;
      else
        cout << "A";
    }
  } else
    cout << "NO";
  return 0;
}
