#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
int maxi = 0;
int maxNum = -1;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    m[v[i]] += 1;
    if (m[v[i]] > maxi) {
      maxi = m[v[i]];
      maxNum = v[i];
    }
  }
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (m[v[i]] == 1) count++;
  }
  int rem = count % 2;
  if (rem == 0) {
    cout << "YES\n";
    bool turn = true;
    for (int i = 0; i < n; i++) {
      if (m[v[i]] == 1) {
        if (turn)
          cout << "A";
        else
          cout << "B";
        turn = not(turn);
      } else
        cout << "A";
    }
  } else {
    if (maxi > 2) {
      cout << "YES\n";
      bool turn = true;
      bool cond = true;
      for (int i = 0; i < n; i++) {
        if (m[v[i]] == 1) {
          if (turn)
            cout << "A";
          else
            cout << "B";
          turn = not(turn);
        } else if (v[i] == maxNum and cond) {
          cout << "B";
          cond = false;
        } else
          cout << "A";
      }
    } else
      cout << "NO";
  }
  return 0;
}
