#include <iostream> using namespace std; long long T, s; int main() { cin >> T; for (int i = 1; i <= T; i++) { cin >> s; if (s == 0) { cout << "E" << endl; } else if (s % 10 == 0) { cout << "E" << endl; } else { cout << "B" << endl; } } return 0; }