#include <bits/stdc++.h>
using namespace std;
int n, a[109], cnt[109], temp, res;
bool used[109], mark[109];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  for (int i = 1; i <= 100; i++) {
    if (cnt[i] == 1) res++;
  }
  for (int i = 0; i < n && temp < res - 1; i++) {
    if (!used[a[i]] && cnt[a[i]] == 1) {
      temp++;
      used[a[i]] = true;
      res--;
      mark[i] = true;
    }
  }
  if (temp < res) {
    for (int i = 0; i < n; i++) {
      if (!used[a[i]] && cnt[a[i]] > 2) {
        temp++;
        used[a[i]] = true;
        mark[i] = true;
        break;
      }
    }
  }
  if (temp == res) {
    printf("YES\n");
    for (int j = 0; j < n; j++) {
      printf("%c", (mark[j] ? 'B' : 'A'));
    }
  } else
    cout << "NO";
  return 0;
}
