#include #include using namespace std; int main(){ int H[3], W[3]; string alphabets[3] = {"A", "B", "C"}; for(int i = 0; i < 3; i++){ cin >> H[i] >> W[i]; } int H_tmp[3]; for(int i = 0; i < 3; i++){ H_tmp[i] = H[i]; } sort(H_tmp, H_tmp + 3, greater()); if(H_tmp[0] == H_tmp[1] && H_tmp[1] == H_tmp[2]){ int W_tmp[3]; for(int i = 0; i < 3; i++){ W_tmp[i] = W[i]; } sort(W_tmp, W_tmp + 3); for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ if(W_tmp[i] == W[j]){ cout << alphabets[j] << endl; break; } } } }else if(H_tmp[0] == H_tmp[1]){ int W_tmp[2]; int out_num; for(int i = 0; i < 3; i++){ if(H_tmp[2] == H[i]){ int j_count = 0; out_num = i; for(int j = 0; j < 3; j++){ if(i != j){ W_tmp[j_count] = W[j]; j_count++; } } break; } } sort(W_tmp, W_tmp + 2); for(int i = 0; i < 2; i++){ for(int j = 0; j < 3; j++){ if(W_tmp[i] == W[j] && j != out_num){ cout << alphabets[j] << endl; break; } } } for(int i = 0; i < 3; i++){ if(H_tmp[2] == H[i]){ cout << alphabets[i] << endl; break; } } }else if(H_tmp[1] == H_tmp[2]){ int W_tmp[2]; int out_num; for(int i = 0; i < 3; i++){ if(H_tmp[0] == H[i]){ cout << alphabets[i] << endl; int j_count = 0; out_num = i; for(int j = 0; j < 3; j++){ if(i != j){ W_tmp[j_count] = W[j]; j_count++; } } break; } } sort(W_tmp, W_tmp + 2); for(int i = 0; i < 2; i++){ for(int j = 0; j < 3; j++){ if(W_tmp[i] == W[j] && j != out_num){ cout << alphabets[j] << endl; break; } } } }else{ for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ if(H_tmp[i] == H[j]){ cout << alphabets[j] << endl; break; } } } } }