#include using namespace std; typedef tuple< int, int, char > height; int main(void) { vector< height > h(3); for (int i = 0; i < 3; ++i) { int he, w; cin >> he >> w; h[i] = make_tuple(he, -w, 'A'+i); } sort(h.begin(), h.end()); cout << get<2>(h[2]) << endl << get<2>(h[1]) << endl << get<2>(h[0]) << endl; return 0; }