#include using namespace std; long long gcd(long long x, long long y) { if (y == 0) return x; return gcd(y, x % y); } long long lcm(long long x, long long y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int main() { vector> HW(201); map, char> mp; for (int i = 0; i < 3; i++) { int H, W; cin >> H >> W; HW[H].push_back(W); mp[pair(H, W)] = 'A' + i; } for (int i = 200; i > 149; i--) { if (HW[i].size() > 0) { sort(HW[i].begin(), HW[i].end(), ::greater()); int n = HW[i].size(); for (int j = 0; j < n; j++) { cout << mp[pair(i, HW[i][j])] << endl; } } } }