#include using namespace std; int a[110]; int main() { int n; cin >> n; map M; for (int i = 0; i < n; i++) scanf("%d", a + i); for (int i = 0; i < n; i++) M[a[i]]++; int cur = 1; set s[2]; for (auto const &x:M) if (x.second == 1) s[cur ^= 1].insert(x.first); string ans(n, 'A'); if (s[0].size() == s[1].size()) { for (int i = 0; i < n; ++i) if (s[1].count(a[i])) ans[i] = 'B'; cout << "YES" << endl << ans; } else { for (int i = 0; i < n; ++i) if (s[1].count(a[i])) ans[i] = 'B'; if (auto idx = find_if(M.begin(), M.end(), [](const auto &x) { return x.second >= 3; });idx == M.end()) cout << "NO"; else { for (int i = 0; i < n; i++) if (a[i] == idx->first) { ans[i] = 'B'; break; } cout << "YES" << endl << ans; } } return 0; }