/* -*- coding: utf-8 -*- * * 571.cc: No.571 3人兄弟(その2) - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int N = 3; /* typedef */ struct Stat { int h, w, i; Stat() {} Stat(int _h, int _w, int _i): h(_h), w(_w), i(_i) {} bool operator<(const Stat &s) const { return h > s.h || (h == s.h && w < s.w); } }; /* global variables */ Stat hws[N]; /* subroutines */ /* main */ int main() { for (int i = 0; i < N; i++) { int hi, wi; scanf("%d%d", &hi, &wi); hws[i] = Stat(hi, wi, i); } sort(hws, hws + N); for (int i = 0; i < N; i++) printf("%c\n", 'A' + hws[i].i); return 0; }