#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>A; void sol() { REP(i,3) { int H;cin>>H; A.push_back({H,'A'+i}); } sort(rbegin(A),rend(A)); REP(i,3) { cout<>TE; while(TE--)sol(); }