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

int b[8][8] = {{0}};  // b = block

    bool isA(int i, int j){
        if(i + 1 < 8 && j + 1 < 8){
            if(b[i][j] == 1 && b[i][j + 1] == 1 && b[i + 1][j] == 1 && b[i + 1][j + 1] == 1) 
                return true;
        }
        return false;
    }

    bool isB(int i, int j){
        if(i + 3 < 8 && j < 8){
            if(b[i][j] == 1 && b[i + 1][j] == 1 && b[i + 2][j] == 1 && b[i + 3][j] == 1)
                return true;
        }
        return false;
    }

    bool isC(int i, int j){
        if(i< 8 && j + 3 < 8){
            if(b[i][j] == 1 && b[i][j + 1] == 1 && b[i][j + 2] == 1 && b[i][j + 3] == 1)
                return true;
        }
        return false; 
    }

    bool isD(int i, int j){
        if(i + 2 < 8 && j - 1 >= 0){
            if(b[i][j] == 1 && b[i + 1][j] == 1 && b[i + 1][j - 1] == 1 && b[i + 2][j - 1] == 1)
                return true;
        }
        return false;
    }

    bool isE(int i, int j){
        if(i + 1 < 8 && j + 2 < 8){
            if(b[i][j] == 1 && b[i][j + 1] == 1 && b[i + 1][j + 1] == 1 && b[i + 1][j + 2] == 1)
                return true;
        }
        return false;
    }

    bool isF(int i, int j){
        if(i + 2 < 8 && j + 1 < 8){
            if(b[i][j] == 1 && b[i + 1][j] == 1 && b[i + 1][j + 1] == 1 && b[i + 2][j + 1] == 1)
                return true;
        }
        return false;
    }

    bool isG(int i, int j){
        if(i + 1 < 8 &&  j - 1 >= 0 && j + 1 < 8){
            if(b[i][j] == 1 && b[i][j + 1] == 1 && b[i + 1][j] == 1 && b[i + 1][j - 1] == 1)
                return true;
        }
        return false;
    }

int main(void){
    int i, j;

    string str;
    while(true) {
        for(i=0; i < 8; i++) {
            if(!(cin >> str)) {
                return 0;
            }
            for(j=0; j < 8; j++) {
                b[i][j] = str[j] == '1' ? 1 : 0;
                //cout << b[i][j]; 
            }
            //cout << endl;
        }
        for(i = 0; i < 8; i++){
            for(j = 0; j < 8; j++){
                //output
                if(b[i][j] == 1){
                    if(isA(i, j)) cout << "A" << endl;
                    if(isB(i, j)) cout << "B" << endl;
                    if(isC(i, j)) cout << "C" << endl;
                    if(isD(i, j)) cout << "D" << endl;
                    if(isE(i, j)) cout << "E" << endl;
                    if(isF(i, j)) cout << "F" << endl;
                    if(isG(i, j)) cout << "G" << endl;
                }  
            }
        }
    }

/**
    char b[8];
    std str;
    for(i = 0; i < 8; i++){
        cin >> b[i];
        str = std::to_string(b[i]);
    }
    for(i = 0; i < 8; i++){
        cout << str << endl;
    }*/
    

}
