#include <bits/stdc++.h>
using namespace std;
const long long inf = 707406378;
const int maxn = 200005 * 4 + 3;
void read(long long &x) {
  char ch;
  bool flag = 0;
  for (ch = getchar(); !isdigit(ch) && ((flag |= (ch == '-')) || 1);
       ch = getchar())
    ;
  for (x = 0; isdigit(ch); x = (x << 1) + (x << 3) + ch - 48, ch = getchar())
    ;
  x *= 1 - 2 * flag;
}
int val[maxn];
map<int, int> mp;
char ans[maxn];
int vis[maxn];
int main() {
  int n, one = 0, bigone = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> val[i], mp[val[i]]++;
  for (int i = 0; i < n; i++) {
    if (mp[val[i]] == 1)
      one++;
    else if (mp[val[i]] > 2)
      bigone++;
  }
  if (one % 2 && bigone == 0) return 0 * printf("NO");
  if (one % 2 == 0) {
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (mp[val[i]] == 1) {
        if (flag)
          ans[i] = 'A';
        else
          ans[i] = 'B';
        flag = 1 - flag;
      } else
        ans[i] = 'A';
    }
  } else {
    int tmp = 0;
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (mp[val[i]] == 1) {
        if (flag)
          ans[i] = 'A';
        else
          ans[i] = 'B';
        flag = 1 - flag;
      } else {
        if (mp[val[i]] == 2) {
          ans[i] = 'A';
          continue;
        }
        if (tmp && !vis[val[i]]) {
          ans[i] = 'A';
          continue;
        }
        tmp = 1;
        if (vis[val[i]] == 0)
          ans[i] = 'B';
        else
          ans[i] = 'A';
        vis[val[i]] = 1;
      }
    }
  }
  puts("YES");
  puts(ans);
  return 0;
}
