#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, i, j, n, m, k, q;
  {
    int b[1000] = {0};
    long long a[1000] = {0};
    string z;
    for (j = 0; j < 200; j++) {
      z += 'z';
      b[j] = 0;
    }
    long long count = 0;
    cin >> n;
    long long ans_i = -1;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      b[a[i]]++;
      if (b[a[i]] > 2) {
        ans_i = i;
      }
    }
    long long count_a = 0, count_b = 0;
    bool flag = true, flag2 = true;
    for (int i = 0; i < n; i++) {
      if (b[a[i]] == 1) {
        if (flag) {
          count_a++;
          z[i] = 'A';
          flag = false;
        } else if (!flag) {
          count_b++;
          z[i] = 'B';
          flag = true;
        }
      }
    }
    if (count_a != count_b) {
      if (ans_i != -1) {
        z[ans_i] = 'B';
      } else {
        flag2 = false;
      }
    }
    if (flag2) {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) {
        if (z[i] == 'z') {
          cout << 'A';
        } else {
          cout << z[i];
        }
      }
      cout << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
