#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

int cnt=0;
string  w[8], ans;

	while(!cin.eof()){
		ans = "?";
		rep(i,8) rep(j,8) cin >> w[i][j];
		if(cin.eof()) break;
		rep(i,8) rep(j,8) if(w[i][j] == '1'){
			if(w[i][j+1]  + w[i+1][j+1]  + w[i+1][j] == 3 + 3 * '0'){
				ans = "A";  break; }
			if(w[i+1][j]  + w[i+2][j] + w[i+3][j]  == 3 + 3 * '0'){
				ans = "B";  break; }
			if(w[i][j+1]  + w[i][j+2] + w[i][j+3] == 3 + 3 * '0'){
				ans = "C";  break; }
			if(w[i+1][j-1] + w[i+1][j] +  w[i+2][j-1] == 3 + 3 * '0'){
				ans = "D";  break; }
			if(w[i][j+1] + w[i+1][j+1] +  w[i+1][j+2] == 3 + 3 * '0'){
				ans = "E";  break; }
			if(w[i+1][j] + w[i+1][j+1] +  w[i+2][j+1] == 3 + 3 * '0'){
				ans = "F";  break; }
			if(w[i][j+1] + w[i+1][j-1] +  w[i+1][j] == 3 + 3 * '0'){
				ans = "D";  break; }
			}
		cout <<  ans << endl;
//		cnt++; if(cnt>40) break;
	}
	return 0;
	
	
}