#include using namespace std; int main() { vector> brothers(3); cin >> get<0>(brothers.at(0)) >> get<1>(brothers.at(0)); cin >> get<0>(brothers.at(1)) >> get<1>(brothers.at(1)); cin >> get<0>(brothers.at(2)) >> get<1>(brothers.at(2)); get<2>(brothers.at(0)) = 'A'; get<2>(brothers.at(1)) = 'B'; get<2>(brothers.at(2)) = 'C'; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2 - i; j++) { if (get<0>(brothers.at(j)) < get<0>(brothers.at(j + 1)) || (get<0>(brothers.at(j)) == get<0>(brothers.at(j + 1)) && get<1>(brothers.at(j)) > get<1>(brothers.at(j + 1)))) swap(brothers.at(j), brothers.at(j + 1)); } } for (tuple t : brothers) cout << get<2>(t) << endl; }