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

char charField[15][15];

int main(){
	while(cin >> charField[0][0]){

		for(int i=0; i < 15; i++){
			for(int j=0; j < 15; j++){
				charField[i][j] = '0';
			}
		}

		for(int i=0; i < 8; i++){
			for(int j=0; j < 8; j++){
				if(i==0 && j == 0)continue;
				cin >> charField[j][i];
			}
		}

		for(int i=0; i < 8; i++){
			for(int j=0; j < 8; j++){
				cout << charField[i][j];
			}
			cout << endl;
		}

		for(int i=0; i < 8; i++){
			for(int j=0; j < 8; j++){
				if(charField[i][j] == '1' && charField[i+1][j] == '1' && charField[i][j+1] && charField[i+1][j+1] == '1') cout << "A" << endl;
				else if(charField[i][j] == '1' && charField[i][j+1] == '1' && charField[i][j+2] == '1' && charField[i][j+3] == '1') cout << "B" << endl;
				else if(charField[i][j] == '1' && charField[i+1][j] == '1' && charField[i+2][j] == '1' && charField[i+3][j] == '1') cout << "C" << endl;
				else if(charField[i+1][j] == '1' && charField[i+1][j+1] == '1' && charField[i][j+1] == '1' && charField[i][j+2] == '1') cout << "D" << endl;
			 	else if(charField[i][j] == '1' && charField[i+1][j] == '1' && charField[i+1][j+1] == '1' && charField[i+2][j+1] == '1') cout << "E" << endl;
				else if(charField[i][j] == '1' && charField[i+1][j] == '1' && charField[i+1][j+1] == '1' && charField[i+1][j+2] == '1') cout << "F" << endl;
				else if(charField[i+1][j] == '1' && charField[i+1][j+1] == '1' && charField[i][j+1] == '1' && charField[i][j+2] == '1') cout << "G" << endl;
			}

		}
	}
}