#include #include #include #include #include #include #include using namespace std; typedef long long ll; struct person{ int hight, weight; char name; }; bool comp(const person& a,const person& b){ if (a.hight != b.hight){ return a.hight > b.hight; } return a.weight < b.weight; } int main(void){ string s = "ABC"; vector v(3); for (int i = 0; i < 3; i++){ int h, w; cin >> h >> w; v.push_back({ h, w, s[i] }); } sort(v.begin(), v.end(), comp); for (int i = 0; i < 3; i++){ cout << v[i].name << endl; } }