#include<iostream>
#include<string>

using namespace std;
int main(){
	
	while(1){
	string str[8];
	for(int i =0;i<8;i++)
		cin >> str[i];
	
	bool stop = false;
	for(int i=0;i<8;i++){
	for(int k=0;k<8;k++){
	if(str[i][k] == '1'){
		if(str[i][k+1] == '1' && str[i+1][k+1] == '1'&& str[i+1][k] == '1' ){
		cout << "A" << endl;  stop = true; break;
		} else if(str[i+1][k] == '1' && str[i+2][k] == '1'&& str[i+3][k] == '1' ){
		cout << "B" << endl; stop = true; break;
		} else if(str[i][k+1] == '1' && str[i][k+2] == '1'&& str[i][k+3] == '1' ){
		cout << "C" << endl;  stop = true; break;
		} else if(str[i+1][k] == '1' && str[i+1][k-1] == '1'&& str[i+2][k-1] == '1' ){
		cout << "D" << endl;  stop = true; break;
		} else if(str[i][k+1] == '1' && str[i+1][k+1] == '1'&& str[i+1][k+2] == '1' ){
		cout << "E" << endl;  stop = true; break;
		} else if(str[i+1][k] == '1' && str[i+1][k+1] == '1'&& str[i+2][k+1] == '1' ){
		cout << "F" << endl;  stop = true; break;
		} else if(str[i][k+1] == '1' && str[i+1][k] == '1'&& str[i+1][k-1] == '1' ){
		cout << "G" << endl;  stop = true; break;
		}
	
	}
	
	}
	if(stop == true) break;
	}
	if (!getline(cin, str[0]))
    break;
	
	}
	