#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; } template bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; } template T gcd(T a, T b){ return a % b ? gcd(b, a % b) : b; } template T lcm(T a, T b){ return a / gcd(a, b) * b; } struct Person{ char name; int H, W; }; bool comp(Person l, Person r){ if(l.H == r.H){ return l.W < r.W; }else{ return l.H > r.H; } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); Person P[3]; rep(i, 0, 3){ P[i].name = 'A' + i; cin >> P[i].H >> P[i].W; } sort(P, P+3, comp); rep(i, 0, 3) cout << P[i].name << endl; return 0; }