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

char sur[14][14];
const char WALL=10;

int main(void){
	char c;

	while(scanf("%c",&c)!=EOF){
		for(int y=0;y<14;y++){
			for(int x=0;x<14;x++){
				if(x<3 || x>10 || y<3 || y>10) sur[y][x]=WALL;
				else if(x==3 && y==3) sur[y][x]=c;
				else scanf(" %c",&(sur[y][x]));
			}
		}

		for(int y=0;y<14;y++){
			for(int x=0;x<14;x++){
				if(sur[y][x]=='1'){
					if(sur[y][x+1]=='1' && sur[y+1][x]=='1' && sur[y+1][x+1]=='1') cout<<"A\n";
					else if(sur[y+1][x]=='1' && sur[y+2][x]=='1' && sur[y+3][x]=='1') cout<<"B\n";
					else if(sur[y][x+1]=='1' && sur[y][x+2]=='1' && sur[y][x+3]=='1') cout <<"C\n";
					else if(sur[y+1][x]=='1' && sur[y+1][x-1]=='1' && sur[y+2][x-1]=='1') cout<<"D\n";
					else if(sur[y][x+1]=='1' && sur[y+1][x+1]=='1' && sur[y+1][x+2]=='1') cout<<"E\n";
					else if(sur[y+1][x]=='1' && sur[y+1][x+1]=='1' && sur[y+2][x+1]=='1') cout<<"F\n";
					else if(sur[y][x+1]=='1' && sur[y+1][x]=='1' && sur[y+1][x-1]=='1') cout<<"G\n";
					break;
				}
			}
		}
	}

	return 0;
}