#include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { char c[3] = { 'A','B','C' }; pairp[3]; for (int i = 0; i <3 ; i++)cin >> p[i].first>>p[i].second; for (int i = 0; i < 2; i++) { for (int j = i + 1; j < 3; j++) { if (p[i].first > p[j].first) { int swap; swap = p[i].first; p[i].first = p[j].first; p[j].first = swap; char swapp; swapp = c[i]; c[i] = c[j]; c[j] = swapp; } else if (p[i].first == p[j].first) { if (p[i].second < p[j].second) { int swap; swap = p[i].first; p[i].first = p[j].first; p[j].first = swap; char swapp; swapp = c[i]; c[i] = c[j]; c[j] = swapp; } } } } for (int i = 2; i >= 0; i--)cout << c[i] << endl; }