#include <bits/stdc++.h>
using namespace std;
int s[51][51];
long long n, m;
long long viss[51][51] = {};
void dfss(long long x, long long y) {
  if (viss[x][y] == 1) return;
  viss[x][y] = 1;
  if (y + 1 <= m - 1 and (s[x][y + 1] == 1)) dfss(x, y + 1);
  if (x + 1 <= n - 1 and (s[x + 1][y] == 1)) dfss(x + 1, y);
  if (y - 1 >= 0 and (s[x][y - 1] == 1)) dfss(x, y - 1);
  if (x - 1 >= 0 and (s[x - 1][y] == 1)) dfss(x - 1, y);
  if (y - 1 >= 0 and x - 1 >= 0 and (s[x - 1][y - 1] == 1)) dfss(x - 1, y - 1);
  if (x + 1 <= n - 1 and y + 1 <= m - 1 and (s[x + 1][y + 1] == 1))
    dfss(x + 1, y + 1);
  if (x + 1 <= n - 1 and y - 1 >= 0 and (s[x + 1][y - 1] == 1))
    dfss(x + 1, y - 1);
  if (x - 1 >= 0 and y + 1 <= m - 1 and (s[x - 1][y + 1] == 1))
    dfss(x - 1, y + 1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> ux;
  for (long long i = 0; i <= n - 1; i++) {
    cin >> a[i];
    ux[a[i]]++;
  }
  vector<long long> multi;
  vector<long long> ans1;
  char uxx[n];
  for (long long i = 0; i <= n - 1; i++) {
    uxx[i] = '.';
  }
  for (auto u : ux) {
    if (u.second > 2) {
      multi.push_back(u.first);
    }
  }
  for (int i = 0; i < n; i++) {
    if (ux[a[i]] == 1) {
      ans1.push_back(i);
    }
  }
  set<long long> st;
  for (auto u : ux) {
    if (u.second == 1) {
      st.insert(u.first);
    }
  }
  if (st.size() % 2 == 0) {
    cout << "YES"
         << "\n";
    long long sz = ans1.size();
    for (long long i = 0; i <= sz / 2 - 1; i++) {
      uxx[ans1[i]] = 'A';
    }
    for (long long i = sz / 2; i <= sz - 1; i++) {
      uxx[ans1[i]] = 'B';
    }
    for (long long i = 0; i <= n - 1; i++) {
      if (uxx[i] == '.') {
        uxx[i] = 'A';
      }
    }
    for (long long i = 0; i <= n - 1; i++) {
      cout << uxx[i];
    }
  } else {
    if (multi.size() >= 1) {
      cout << "YES"
           << "\n";
      long long sz = ans1.size();
      for (long long i = 0; i <= sz / 2 - 1; i++) {
        uxx[ans1[i]] = 'A';
      }
      for (long long i = sz / 2; i <= sz - 1; i++) {
        uxx[ans1[i]] = 'B';
      }
      for (long long i = 0; i <= n - 1; i++) {
        if (a[i] == multi[0]) {
          uxx[i] = 'A';
          break;
        }
      }
      for (long long i = 0; i <= n - 1; i++) {
        if (uxx[i] == '.') {
          uxx[i] = 'B';
        }
      }
      for (long long i = 0; i <= n - 1; i++) {
        cout << uxx[i];
      }
    } else {
      cout << "NO"
           << "\n";
    }
  }
}
