#include #define rep(i,a,b) for(int i=a;i<(b);++i) #define erep(i,a,b) for(int i=a;i<=(int)(b);++i) #define per(i,a,b) for(int i=(a);i>(b);--i) #define eper(i,a,b) for(int i=(a);i>=b;--i) #define pb push_back #define mp make_pair #define INF 100100100100 #define MOD 1000000007 #define ALL(x) begin(x),end(x) using namespace std; using ll = long long; using pii = pair; using vii = vector; using vll = vector; templateusing vv = vector; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b &a, const tuple &b) { if (get<0>(a) != get<0>(b)) return get<0>(a) > get<0>(b); return get<1>(a) < get<1>(b); } vector > h; int main() { cin.tie(0); ios::sync_with_stdio(false); int ha, hb, hc, wa, wb, wc; cin >> ha >> wa >> hb >> wb >> hc >> wc; h.pb({ha, wa, 'A'}); h.pb({hb, wb, 'B'}); h.pb({hc, wc, 'C'}); sort(ALL(h), cmp); for (auto x : h) cout << get<2>(x) << endl; return 0; }