#include <bits/stdc++.h>
using namespace std;
int a[105], c[105], pos[105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    c[a[i]]++;
  }
  int s = 0, flag = 1;
  for (int i = 1; i <= 100; i++)
    if (c[i] == 1) s++;
  if (s % 2 == 0) {
    int g = 0;
    for (int i = 1; g * 2 < s; i++)
      if (c[a[i]] == 1) pos[i] = 1, g++;
  } else {
    flag = 0;
    for (int i = 1; i <= 100; i++)
      if (c[i] > 2) {
        flag = i;
        break;
      }
    if (flag) {
      int g = 0;
      for (int i = 1; g < s / 2; i++)
        if (c[a[i]] == 1) pos[i] = 1, g++;
      for (int i = 1; i <= n; i++)
        if (a[i] == flag) {
          pos[i] = 1;
          break;
        }
    }
  }
  if (!flag)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%c", pos[i] ? 'A' : 'B');
    printf("\n");
  }
  return 0;
}
