#include <stdio.h>

int main(void)
{
	int field[8][8]={0};
	int i, j;
	int judge[7];



	for( j = 0 ; j < 8 ; j++ ){
		for( i = 0 ; i < 8 ; i++ ){
			scanf("%d",&field[i][j]);
		}
	}

	for( j = 0 ; j < 8 ; j++ ){
		for( i = 0 ; i < 8 ; j++ ){

									if(field[i][j] == 1){
									judge[0] += 1;
									judge[1] += 1;
									judge[2] += 1;
									judge[3] += 0;
									judge[4] += 1;
									judge[5] += 1;
									judge[6] += 0;}
									if(field[i][j+1] == 1){
									judge[0] += 1;
									judge[1] += 1;
									judge[2] += 0;
									judge[3] += 1;
									judge[4] += 0;
									judge[5] += 1;
									judge[6] += 1;}
									if(field[i+1][j] == 1){
									judge[0] += 1;
									judge[1] += 0;
									judge[2] += 1;
									judge[3] += 1;
									judge[4] += 1;
									judge[5] += 0;
									judge[6] += 1;}
									if(field[i+1][j+1] == 1){
									judge[0] += 1;
									judge[1] += 0;
									judge[2] += 0;
									judge[3] += 1;
									judge[4] += 1;
									judge[5] += 1;
									judge[6] += 1;}
									if(field[i][j+2] == 1){
									judge[0] += 0;
									judge[1] += 1;
									judge[2] += 0;
									judge[3] += 1;
									judge[4] += 0;
									judge[5] += 0;
									judge[6] += 0;}
									if(field[i+2][j] == 1){
									judge[0] += 0;
									judge[1] += 0;
									judge[2] += 1;
									judge[3] += 0;
									judge[4] += 0;
									judge[5] += 0;
									judge[6] += 1;}
									if(field[i+1][j+2] == 1){
									judge[0] += 0;
									judge[1] += 0;
									judge[2] += 0;
									judge[3] += 0;
									judge[4] += 0;
									judge[5] += 1;
									judge[6] += 0;}
									if(field[i+2][j+1] == 1){
									judge[0] += 0;
									judge[1] += 0;
									judge[2] += 0;
									judge[3] += 0;
									judge[4] += 1;
									judge[5] += 0;
									judge[6] += 0;}
									if(field[i+3][j] == 1){
									judge[0] += 0;
									judge[1] += 0;
									judge[2] += 1;
									judge[3] += 0;
									judge[4] += 0;
									judge[5] += 0;
									judge[6] += 0;}
									if(field[i][j+3] == 1){
									judge[0] += 0;
									judge[1] += 1;
									judge[2] += 0;
									judge[3] += 0;
									judge[4] += 0;
									judge[5] += 0;
									judge[6] += 0;}

	if(judge[0] == 4){
		printf("A");
		return 0;}
	if(judge[1] == 4){
		printf("B");
		return 0;}
	if(judge[2] == 4){
		printf("C");
		return 0;}
	if(judge[3] == 4){
		printf("D");
		return 0;}
	if(judge[4] == 4){
		printf("E");
		return 0;}
	if(judge[5] == 4){
		printf("F");
		return 0;}
	if(judge[6] == 4){
		printf("G");
		return 0;}
		
									judge[0] = 0;
									judge[1] = 0;
									judge[2] = 0;
									judge[3] = 0;
									judge[4] = 0;
									judge[5] = 0;
									judge[6] = 0;
		
		}
	}





}