#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int table[10][10];
string s;

int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };

void solve(int i, int j){
	if (table[i + 3][j] == 1){
		cout << "B" << endl;
		return;
	}
	if (table[i][j + 3] == 1){
		cout << "C" << endl;
		return;
	}
	if (j >= 1 && table[i + 2][j - 1] == 1){
		cout << "D" << endl;
		return;
	}
	if (table[i + 1][j + 2] == 1){
		cout << "E" << endl;
		return;
	}
	if (table[i + 2][j + 1] == 1){
		cout << "F" << endl;
	}
	if (table[i][j + 1] == 1){
		if (table[i + 1][j + 1] == 1){
			cout << "A" << endl;
			return;
		}
		else if (j >= 1 && table[i + 1][j - 1] == 1){
			cout << "G" << endl;
			return;
		}
	}
}

int main(){
	while (cin >> s){
		for (int i = 0; i < s.size(); i++){
			table[0][i] = s[i] - '0';
		}
		FOR(i, 1, 8){
			cin >> s;
			for (int j = 0; j < s.size(); j++){
				table[i][j] = s[j] - '0';
			}
		}
		REP(i, 8){
			REP(j, 8){
				if (table[i][j] == 1){
					solve(i, j);
					break;
				}
			}
		}
	}
}