#include <iostream>
using namespace std;

int main() {
	char in[8][8];
	int i, j, ans = 0, lop = 0;
	while (cin >> in[lop]) {
		if (++lop < 8)
			continue;
		lop = 0;
		ans = 0;
		for (i = 0; i < 8; i++) {
			for (j = 0; j < 8; j++) {
				if (in[i][j] == '1')
					goto end;
			}
		}
	end:
		if (in[i + 3][j] == '1') {
			ans = 1;
			goto out;
		}
		if (in[i][j+3] == '1') {
			ans = 2;
			goto out;
		}
		if (in[i + 2][j - 1] == '1') {
			ans = 3;
			goto out;
		}
		if (in[i + 1][j + 2] == '1') {
			ans = 4;
			goto out;
		}
		if (in[i + 2][j + 1] == '1') {
			ans = 5;
			goto out;
		}
		if (in[i + 1][j - 1] == '1') {
			ans = 6;
			goto out;
		}
	out:
		cout << (char)('A' + ans) << endl;
	}
	return 0;
}
