#include <bits/stdc++.h>
using namespace std;
vector<int> nums[105];
char ans[105];
int main(void) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    nums[tmp].push_back(i);
  }
  int ones = 0;
  int upid = -1;
  for (int i = 0; i <= 100; i++) {
    if (nums[i].size() == 1) ones++;
    if (nums[i].size() >= 3) upid = i;
  }
  if (ones % 2 == 0) {
    bool infst = false;
    for (int i = 0; i <= 100; i++) {
      if (nums[i].size() == 1) {
        if (infst) {
          ans[nums[i][0]] = 'A';
        } else {
          ans[nums[i][0]] = 'B';
        }
        infst = !infst;
      } else {
        for (auto elm : nums[i]) ans[elm] = 'A';
      }
    }
  } else {
    if (upid != -1) {
      bool infst = true;
      for (int i = 0; i <= 100; i++) {
        if (nums[i].size() == 1) {
          if (infst) {
            ans[nums[i][0]] = 'A';
          } else {
            ans[nums[i][0]] = 'B';
          }
          infst = !infst;
        } else {
          for (auto elm : nums[i]) ans[elm] = 'A';
          if (i == upid) ans[nums[i][0]] = 'B';
        }
      }
    } else {
      printf("NO");
      return 0;
    }
  }
  ans[n + 1] = 0;
  printf("YES\n%s", ans + 1);
  return 0;
}
