#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  std::vector<int> v;
  for (int i = 0; i < n; i++) {
    int val;
    cin >> val;
    v.push_back(val);
    mp[val]++;
  }
  int nice = 0;
  int flag = -1;
  map<int, int>::iterator it = mp.begin();
  for (it; it != mp.end(); it++) {
    if (it->second == 1)
      nice++;
    else if (it->second > 2)
      flag = it->first;
  }
  if (nice % 2 == 0) {
    nice = nice / 2;
    cout << "YES" << endl;
    for (int i = 0; i < v.size(); i++) {
      if (nice && mp[v[i]] == 1) {
        cout << "A";
        nice--;
      } else
        cout << "B";
    }
    cout << endl;
  } else {
    if (flag > -1) {
      nice = nice / 2;
      cout << "YES" << endl;
      for (int i = 0; i < v.size(); i++) {
        if (nice && mp[v[i]] == 1) {
          cout << "A";
          nice--;
        } else if (v[i] == flag) {
          cout << "A";
          flag = -1;
        } else
          cout << "B";
      }
      cout << endl;
    } else {
      cout << "NO\n";
    }
  }
}
