#pragma GCC optimize("Ofast") #include #include #include #include #include #include #include #include #include const long long INF_L = 1e17+7; const long long INF_I = 1e9+7; const long long MOD = 1e9+7; const double EPS = 1e-8; const double PI=acos(-1); using namespace std; struct A{ int h; int w; char n; }; int main(){ cin.tie(0); ios::sync_with_stdio(false); struct A a[3]; for(int i=0;i<3;i++){ cin >> a[i].h >> a[i].w; a[i].n=(char)('A'+i); } for(int i=0;i<2;i++){ for(int j=i+1;j<3;j++){ struct A temp; if(a[i].h < a[j].h){ temp=a[i]; a[i]=a[j]; a[j]=temp; }else if(a[i].h == a[j].h){ if(a[i].w > a[j].w){ temp=a[j]; a[j]=a[i]; a[i]=temp; } } } } for(int i=0;i<3;i++){ cout << a[i].n << endl; } return 0; }