#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVL; typedef vector VVI; typedef pair P; typedef pair PL; int main() { vector > a(3); REP(i,3){ cin >> a[i].first.first >> a[i].first.second; a[i].first.second *= -1; a[i].second = 'A' + i; } sort(ALL(a)); reverse(ALL(a)); REP(i,3) cout << a[i].second << endl; return 0; }