#include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; int main() { vector> v; for (int i = 0; i < 3; ++i) { int h, w; cin >> h >> w; v.emplace_back(-h, w, i); } sort(v.begin(), v.end()); for (int i = 0; i < 3; ++i) { cout << char('A'+get<2>(v[i])) << "\n"; } return 0; }