#include <bits/stdc++.h>
using namespace std;
string place[2] = {"A", "B"};
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ar(n);
  for (long long int i = 0; i < n; i++) cin >> ar[i];
  map<long long int, long long int> cnt;
  for (auto &it : ar) cnt[it]++;
  long long int sp = 0, imb = 0;
  map<long long int, long long int> SP, IMB;
  for (auto &it : cnt) {
    if (it.second == 1) {
      sp++;
      SP[it.first];
    } else if (it.second >= 3) {
      imb++;
      IMB[it.first];
    }
  }
  if (sp % 2 == 0) {
    string s = "";
    for (auto &it : ar) {
      if (SP.find(it) != SP.end()) {
        s = s + place[sp % 2];
        sp--;
      } else {
        s = s + "A";
      }
    }
    cout << "YES\n" << s;
  } else {
    if (imb == 0) {
      cout << "NO";
    } else {
      string s = "";
      for (auto &it : ar) {
        if (SP.find(it) != SP.end()) {
          s = s + place[sp % 2];
          sp--;
        } else {
          s = s + "B";
        }
      }
      for (long long int i = 0; i < n; i++) {
        if (IMB.find(ar[i]) != IMB.end()) {
          s[i] = 'A';
          break;
        }
      }
      cout << "YES\n" << s;
    }
  }
  return 0;
}
