#include using namespace std; int main() { pair p[3]; vector ran{0, 1, 2}; int max_h; for (int i = 0; i < 3; i++) { cin >> p[i].first; cin >> p[i].second; } if (p[ran[0]].first < p[ran[1]].first) swap(ran[0], ran[1]); if (p[ran[1]].first < p[ran[2]].first) swap(ran[1], ran[2]); if (p[ran[0]].first < p[ran[1]].first) swap(ran[0], ran[1]); for (int i = 0; i < 2; i++) if (p[ran[i]].first == p[ran[i+1]].first) if (p[ran[i]].second > p[ran[i+1]].second) swap(ran[i], ran[i+1]); for (int i = 0; i < 3; i++) printf("%c\n", 'A' + ran[i]); return 0; }