#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define drep(n,m) for(int i=0;i<n;i++)for(int j=0;j<m;j++)
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

ll gcd(ll a,ll b){
    if(a<b){
        int t=a;a=b;b=t;
    }
    int c=a%b;
    while(c!=0){
        a=b;
        b=c;
        c=a%b;
    }
    return b;
}

ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

bool isPrime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

int kaizyo(int x){
    if(x==1)return x;
    else return x*kaizyo(x-1);
}


int main() {
    vector<vector<char>> v(8,vector<char>(8));
    while(cin>>v[0][0]){
        rep(i,1,8)cin>>v[0][i];
    rep(i,1,8)rep(j,0,8)cin>>v[i][j];
    rep(i,0,8){
        rep(j,0,8){
            if(v[i][j]=='1'){
                //cout<<9<<endl;
                if(v[i][j+1]=='1'&&v[i+1][j]=='1'&&v[i+1][j+1]=='1'){cout<<"A"<<endl;goto AWAY;}
                if(v[i+1][j]=='1'&&v[i+1][j-1]=='1'&&v[i+2][j-1]=='1'){cout<<"D"<<endl;goto AWAY;}
                if(v[i][j+1]=='1'&&v[i+1][j+2]=='1'&&v[i+1][j+1]=='1'){cout<<"E"<<endl;goto AWAY;}
                if(v[i][j+1]=='1'&&v[i+2][j+1]=='1'&&v[i+1][j+1]=='1'){cout<<"F"<<endl;goto AWAY;}
                if(v[i][j+1]=='1'&&v[i+1][j]=='1'&&v[i+1][j-1]=='1'){cout<<"G"<<endl;goto AWAY;}
                if(v[i+3][j]=='1'){cout<<"B"<<endl;goto AWAY;}
                if(v[i][j+3]=='1'){cout<<"C"<<endl;goto AWAY;}
            }
        }
    }
    AWAY:;
    }
    return 0;
}

