#include using namespace std; int main() { int height, weight; pair, char> p[3]; for (int i = 0; i < 3; i++) { cin >> height >> weight; p[i] = {{-height, weight}, 'A'+i}; } sort(p, p+3); for (int i = 0; i < 3; i++) cout << p[i].second << endl; return 0; }