#include <iostream> #include <string> using namespace std; int main () { string p[10] = {"BNZ", "CIP", "DOQ", "ER", "FS", "GT", "HU", "JVX", "KLY", "AMW"}; int id, c, w; while (cin >> id) { c = id % 10; for (w=1; id/=10; w++) c += id % 10 * w; cout << p[c%10] << endl; } }