Problem: Vasya has a multiset s consisting of n integer numbers. Vasya calls some number x nice if it appears in the multiset exactly once. For example, multiset \{1, 1, 2, 3, 3, 3, 4\} contains nice numbers 2 and 4.

Vasya wants to split multiset s into two multisets a and b (one of which may be empty) in such a way that the quantity of nice numbers in multiset a would be the same as the quantity of nice numbers in multiset b (the quantity of numbers to appear exactly once in multiset a and the quantity of numbers to appear exactly once in multiset b).

Input

The first line contains a single integer n~(2 ≤ n ≤ 100).

The second line contains n integers s_1, s_2, ... s_n~(1 ≤ s_i ≤ 100) — the multiset s.

Output

If there exists no split of s to satisfy the given requirements, then print "NO" in the first line.

Otherwise print "YES" in the first line.

The second line should contain a string, consisting of n characters. i-th character should be equal to 'A' if the i-th element of multiset s goes to multiset a and 'B' if if the i-th element of multiset s goes to multiset b. Elements are numbered from 1 to n in the order they are given in the input.

If there exist multiple solutions, then print any of them.

Examples

Input

4
3 5 7 1


Output

YES
BABA


Input

3
3 5 1


Output

NO

Solution (in CPP):

Solution:
#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;
  }
}