#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, i, j;
  cin >> n;
  map<long long, long long> mp, cp;
  vector<long long> v(n);
  for (i = 0; i < n; i++) {
    cin >> v[i];
    mp[v[i]]++;
  }
  map<long long, long long>::iterator it;
  for (it = mp.begin(); it != mp.end(); it++) {
    cp[it->second]++;
  }
  if (cp.find(1) == cp.end() || cp[1] % 2 == 0) {
    long long cnt = 0;
    cout << "YES" << endl;
    for (i = 0; i < n; i++) {
      if (mp[v[i]] == 1) {
        if (cnt < cp[1] / 2) {
          cout << "A";
        } else
          cout << "B";
        cnt++;
      } else
        cout << "A";
    }
  } else {
    if (cp[1] + 2 * cp[2] == n) {
      cout << "NO";
    } else {
      cout << "YES" << endl;
      long long cnt = 0, t = 1;
      for (i = 0; i < n; i++) {
        if (mp[v[i]] == 1) {
          if (cnt < (cp[1] + 1) / 2) {
            cout << "A";
          } else {
            cout << "B";
          }
          cnt++;
        } else if (mp[v[i]] == 2) {
          cout << "A";
        } else {
          if (t == 1) {
            cout << "B";
            t++;
          } else {
            cout << "A";
          }
        }
      }
    }
  }
}
