#include #include #include #include #include #include #include using namespace std; typedef long long ll; int main(void){ int A, B, C, wa, wb, wc; cin >> A >> wa >> B >> wb >> C >> wc; int a[3] = { A, B, C }; int w[3] = { wa, wb, wc }; for (int i = 0; i < 3; i++){ for (int j = 0; j < 2; j++){ if (a[j + 1] <= a[j]){ swap(a[j], a[j + 1]); if (a[j + 1] == a[j]){ if (w[j+1] < w[j]){ swap(a[j], a[j + 1]); continue; } } swap(w[j], w[j + 1]); } } } for (int i = 2; i >= 0; i--){ if (a[i] == A&&w[i] == wa){ cout << 'A' << endl; } else if (a[i] == B&&w[i]== wb){ cout << 'B' << endl; } else if (a[i] == C&&w[i] == wc){ cout << 'C' << endl; } } }