#include <bits/stdc++.h>
using namespace std;

int main(){
  vector<string> S(8);

  while(cin >> S[0]){
    for(int i=1; i<8; i++) cin >> S[i];

    vector<string> shape = {"B", "C", "D", "E", "F", "G", "A"};
    vector<int> dx = {0, 3, 1, 2, 1, 2, 1};
    vector<int> dy = {3, 0, -2, 1, 2, -1, 1};

    bool flag = false;
    for(int x=0; x<8; x++){
      for(int y=0; y<8; y++){
        for(int i=0; i<7; i++){
          int cx = x + dx[i], cy = y + dy[i];
          if(0 <= cx && cx < 8 && 0 <= cy && cy < 8){
            if(S[y][x] == '1' && S[cy][cx] == '1'){
              cout << shape[i] << endl;
              flag = true;
            }
          }
          if(flag) break;
        }
        if(flag) break;
      }
      if(flag) break;
    }
  }
}
  
  
