#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
using namespace std;

int main(){
	string surface[8];
	while(cin >> surface[0]){
		for(int i = 1; i < 8; i++)cin >> surface[i];
		for(int i = 0; i < 8; i++){
			for(int j = 0; j < 8; j++){
				if(surface[i][j] == '1'){
					if(surface[i][j + 1] == '1'){
						if(surface[i][j + 2] == '1'){
							cout << "C" << endl;
							goto fin;
						}else{
							if(surface[i + 1][j] == '1'){
								if(surface[i + 1][j + 1] == '1'){
									cout << "A" << endl;
									goto fin;
								}else{
									cout << "G" << endl;
									goto fin;
								}
							}else{
								cout << "E" << endl;
								goto fin;
							}
						}
					}else{
						if(surface[i + 2][j] == '1'){
							cout << "B" << endl;
							goto fin;
						}else{
							if(surface[i + 1][j + 1] == '1'){
								cout << "F" << endl;
								goto fin;
							}else{
								cout << "D" << endl;
								goto fin;
							}
						}
					}
				}
			}
		}
		fin:;
	}
}
