#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
inline void rvi(vector<int>& v, int n) {
  int temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    v.push_back(temp);
  }
}
inline void rvll(vector<long long int>& v, int n) {
  long long int temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    v.push_back(temp);
  }
}
inline void prvi(vector<int>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
inline void prvll(vector<long long int>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
inline void prmii(map<int, int>& m) {
  for (auto x : m) {
    cout << x.first << " " << x.second << endl;
  }
}
inline vector<long long int> prefixsum(vector<int>& a) {
  vector<long long int> b;
  b.push_back(a[0]);
  for (int i = 1; i < a.size(); i++) {
    b.push_back(a[i] + b[i - 1]);
  }
  return b;
}
inline vector<long long int> suffixsum(vector<int>& a) {
  vector<long long int> b((a.size()));
  b[(a.size()) - 1] = a[(a.size()) - 1];
  for (int i = (a.size()) - 1 - 1; i >= 0; i--) {
    b[i] = a[i] + b[i + 1];
  }
  return b;
}
inline vector<long long int> prefixsum(vector<long long int>& a) {
  vector<long long int> b;
  b.push_back(a[0]);
  for (int i = 1; i < a.size(); i++) {
    b.push_back(a[i] + b[i - 1]);
  }
  return b;
}
inline vector<long long int> suffixsum(vector<long long int>& a) {
  vector<long long int> b((a.size()));
  b[(a.size()) - 1] = a[(a.size()) - 1];
  for (int i = (a.size()) - 1 - 1; i >= 0; i--) {
    b[i] = a[i] + b[i + 1];
  }
  return b;
}
void solve();
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<char> b(n);
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  int count = 0;
  int flag = 0;
  for (auto x : mp) {
    if (x.second == 1) {
      count++;
    } else if ((x.second) >= 3) {
      flag = 1;
    } else {
      ;
    }
  }
  if ((count % 2) != 0 && flag == 0) {
    cout << "NO" << endl;
  } else if (mp.size() == 1) {
    if (((mp[a[0]])) == 1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) {
        if ((i & 1) == 0) {
          b[i] = 'A';
        } else {
          b[i] = 'A';
        }
      }
      for (int i = 0; i < n; i++) {
        cout << b[i];
      }
      cout << endl;
      return;
    }
  } else {
    cout << "YES" << endl;
    if (flag == 0 || (count % 2) == 0) {
      int check = 0;
      for (int i = 0; i < n; i++) {
        if (mp[a[i]] == 1) {
          if ((check & 1) == 0) {
            b[i] = 'A';
            check++;
          } else {
            b[i] = 'B';
            check++;
          }
        } else {
          b[i] = 'A';
        }
      }
    } else {
      int check = 0;
      for (int i = 0; i < n; i++) {
        if (mp[a[i]] == 1) {
          if ((check & 1) == 0) {
            b[i] = 'A';
            check++;
          } else {
            b[i] = 'B';
            check++;
          }
        } else {
          b[i] = 'A';
        }
      }
      int val;
      for (auto x : mp) {
        if ((x.second >= 3)) {
          val = x.first;
          break;
        }
      }
      for (int i = 0; i < n; i++) {
        if (a[i] == val) {
          b[i] = 'B';
          break;
        }
      }
    }
    for (int i = 0; i < n; i++) {
      cout << b[i];
    }
    cout << endl;
  }
}
