#include<iostream>
#include<string>
using namespace std;

int main(){
    
    string str[10];
    
    while(cin >> str[0]){
        
        for(int i=1;i<8;i++){
            cin >> str[i];
        }
        
        for(int i=0;i<8;i++){
            for(int j=0;j<8;j++){
                
                if(i < 7 && j < 7){
                    if(str[i][j] == '1' && str[i][j+1] == '1' && str[i+1][j] == '1' && str[i+1][j+1] == '1'){
                        cout << 'A' << endl;
                    }
                }
                
                if(i < 5){
                    if(str[i][j] == '1' && str[i+1][j] == '1' && str[i+2][j] == '1'&& str[i+3][j] == '1'){
                        cout << 'B' << endl;
                    }
                }
                
                if(j == 0 && str[i].find("1111") != string::npos){
                    cout << 'C' << endl;
                }
                
                if(i < 6 && 0 < j){
                    if(str[i][j] == '1' && str[i+1][j-1] == '1' && str[i+1][j] == '1'&& str[i+2][j-1] == '1'){
                        cout << 'D' << endl;
                    }
                }
                
                if(i < 7 && j < 6){
                    if(str[i][j] == '1' && str[i][j+1] == '1' && str[i+1][j+1] == '1'&& str[i+1][j+2] == '1'){
                        cout << 'E' << endl;
                    }
                }
                
                if(i < 6 && j < 7){
                    if(str[i][j] == '1' && str[i+1][j] == '1' && str[i+1][j+1] == '1'&& str[i+2][j+1] == '1'){
                        cout << 'F' << endl;
                    }
                }
                
                if(i < 7 && 0 < j && j < 7){
                    if(str[i][j] == '1' && str[i][j+1] == '1' && str[i+1][j-1] == '1'&& str[i+1][j] == '1'){
                        cout << 'G' << endl;
                    }
                }
                
            }
        }
        
        
    }
    
    return(0);
}
