#include <iostream>
using namespace std;
char ma[8][8];

void c(int x,int y){

  if(ma[y+3][x] == '1'  )cout << 'B'<<endl;
  else if(ma[y][x+3] == '1')cout << 'C' << endl;
  else if(ma[y+2][x-1] == '1' )cout << 'D' << endl;
  else if(ma[y+1][x+2] == '1' )cout << 'E' << endl;
  else if(ma[y+2][x+2] == '1' )cout << 'F' << endl;
  else if(ma[y][x+1] == '1' && ma[y+1][x-1] == '1' )cout << 'G' << endl;
  else cout << 'A' <<endl;

}

int main(){



    for(int i = 0 ; i < 8 ; i++ ){
      for(int j = 0 ; j < 8 ; j++ ){
	cin >> ma[i][j]; 
      }
    }

    int f = 0;
    for(int i = 0 ; i < 8 ; i++ ){
      for(int j = 0 ; j < 8 ; j++ ){
	if(ma[i][j] == '1'){
	  c(j,i);
	  f = 1;
	}
	if(f)break;
      }
    if(f)break;    
  }
  return 0;
}