#include <bits/stdc++.h>
using namespace std;
char str[1000], tmp[1000];
int val[150], num[150], que[150];
int main() {
  int t, b, c, n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &que[i]);
    val[que[i]]++;
  }
  int a = 1, mark = -1;
  for (int i = 1; i <= 100; i++) {
    if (val[i] == 1) {
      num[i] = a;
      a = 3 - a;
    }
  }
  if (a == 2) {
    for (int i = 1; i <= n; i++) {
      if (val[que[i]] > 2) {
        mark = que[i];
        break;
      }
    }
    if (mark == -1)
      puts("NO");
    else {
      puts("YES");
      for (int i = 1; i <= n; i++) {
        if (que[i] == mark) {
          printf("B");
          mark = -1;
          continue;
        }
        if (num[que[i]] == 1)
          printf("A");
        else if (num[que[i]] == 2)
          printf("B");
        else
          printf("A");
      }
    }
  } else {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      if (num[que[i]] == 1)
        printf("A");
      else if (num[que[i]] == 2)
        printf("B");
      else
        printf("A");
    }
  }
  puts("");
  return 0;
}
