#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { vector> xs(3); for (auto i = 0; i < 3; ++i) { int32_t h, w; cin >> h >> w; auto c = char('A' + i); xs[i] = {-h, w, c}; } sort(xs.begin(), xs.end()); for (auto i = 0; i < 3; ++i) { cout << get<2>(xs[i]) << endl; } return 0; }