#include<iostream>
using namespace std;
int main() {
	char l[8][8];
	const char c = '1';
	int a, b;
	for (int i = 0; i < 8; i++){
		cin >> l[i];
	}
	for (int i = 0; i < 8; i++){
		for (int j = 0; j < 8; j++){
			if (l[i][j] == c){
				a = i;
				b = j;
				break;
			}
		}
	}
	if (l[a][b + 1] == c){
		//ACEG
		if (l[a + 1][b] == c){
			if (l[a + 1][b + 1] == c){
				cout << 'A';
			}else cout << 'G';
		}
		else if (l[a][b + 2] == c) {
			cout << 'C';
		}else cout << 'E';
	}else{
		//BDF
		if (l[a + 2][b] == c){
			cout << 'B';
		}
		else if (l[a + 1][b + 1] == c){
			cout << 'F';
		}
		else cout << 'D';
	}
	cout << endl;
}