#include <bits/stdc++.h>
using namespace std;
int n;
int h[105], a[105], cntn, c[105];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    h[a[i]]++;
  }
  int flag = 0;
  for (int i = 0; i <= 100; i++) {
    if (h[i] == 1) {
      c[i] = flag;
      flag = 1 - flag;
    }
  }
  if (flag)
    for (int i = 0; i <= 100; i++)
      if (h[i] > 2) {
        c[i] = 1;
        flag = 0;
        break;
      }
  if (flag)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      if (c[a[i]] == 1 && h[a[i]] == 1)
        cout << "B";
      else
        cout << "A";
      h[a[i]]--;
    }
  }
  return 0;
}
