#include #include #include #include #include #include #include #include #include #include using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); vector, char> >A(3); int a, b; for (int i = 0; i < 3; i++) { cin >> a >> b; A[i].first.first = -a; A[i].first.second = b; A[i].second = char(i + 'A'); } sort(A.begin(), A.end()); for (int i = 0; i < 3; i++) { cout << A[i].second << endl; } }