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