#include #include #include using namespace std; int main() { int h,w; vector,char>> p(3); for(int i=0; i<3; i++) { cin >> h >> w; p[i]=make_pair(make_pair(-1*h,w),'A'+i); } sort(p.begin(),p.end()); for(int i=0; i<3; i++) { cout << p[i].second << endl; } }