#include<iostream>
using namespace std;

int main() {
	int a = 0;
	char maze[10][10];
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			maze[i][j] = '0';
		}
	}
	while (cin >> maze[1][1]) {
		for (int i = 2; i < 9; i++) {
			cin >> maze[1][i];
		}
		for (int i = 2; i < 9; i++) {
			for (int j = 1; j < 9; j++) {
				cin >> maze[i][j];
			}
		}
		int ok = 0;
		for (int i = 1; i < 9; i++) {
			for (int j = 1; j < 9; j++) {
				if (maze[i][j] == '1') {
					ok = 1;
					if (maze[i][j + 1] == '1') {
						if (maze[i][j + 2] == '1') {
							cout << "C" << endl;
						}
						else {
							if (maze[i + 1][j] == '1') {
								if (maze[i + 1][j + 1] == '1') {
									cout << "A" << endl;
								}
								else {
									cout << "G" << endl;
								}
							}
							else {
								cout << "E" << endl;
							}
						}
					}
					else {
						if (maze[i + 1][j - 1] == '1') {
							cout << "D" << endl;
						}
						else if (maze[i + 1][j + 1] == '1') {
							cout << "F" << endl;
						}
						else {
							cout << "B" << endl;
						}
					}
				}
				if (ok) break;
			}
			if (ok) break;
		}
		//if (a) cout << endl;
		a++;
	}

}
