#include #include #include #include #include const int mod = 998244353; struct Status { int h, w; char name; bool operator<(const Status& another) const { if (h != another.h) { return h > another.h; } return w < another.w; } }; int main() { std::vector v(3); for (int i = 0; i < 3; i++) { std::cin >> v[i].h >> v[i].w; v[i].name = 'A' + i; } std::sort(v.begin(), v.end()); for (int i = 0; i < 3; i++) { std::cout << v[i].name << std::endl; } }