#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	std::vector<std::string> image;
	std::string buf;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif


#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		image.clear();
		image.push_back(buf);
		for(int i = 0; i < 7; i++){
#if INPUT_FROM_FILE
			std::getline(ifs, buf);
#else
			std::getline(std::cin, buf);
#endif
			
			image.push_back(buf);
		}
#if INPUT_FROM_FILE
		std::getline(ifs, buf);
#else
		std::getline(std::cin, buf);
#endif

		int w = 8;
		int h = 8;
		for(int y = 0; y < h; y++){
			for(int x = 0; x < w; x++){
				if(image[y][x] == '1'){
					//A
					if(x < w - 1 && y < h - 1 && image[y][x + 1] == '1' && image[y + 1][x] == '1' && image[y + 1][x + 1] == '1'){
						std::cout << "A" << std::endl;
						y = h;
						break;
					}
					//B
					else if(y < h - 3 && image[y + 1][x] == '1' && image[y + 2][x] == '1' && image[y + 3][x] == '1'){
						std::cout << "B" << std::endl;
						y = h;
						break;
					}
					//C
					else if(x < w - 3 && image[y][x + 1] == '1' && image[y][x + 2] == '1' && image[y][x + 3] == '1'){
						std::cout << "C" << std::endl;
						y = h;
						break;
					}
					//D
					else if(x >= 1 && y < h - 2 && image[y + 1][x] == '1' && image[y + 1][x - 1] == '1' && image[y + 2][x - 1] == '1'){
						std::cout << "D" << std::endl;
						y = h;
						break;
					}
					//E
					else if(x < w - 2 && y < h - 1 && image[y][x + 1] == '1' && image[y + 1][x + 1] == '1' && image[y + 1][x + 2] == '1'){
						std::cout << "E" << std::endl;
						y = h;
						break;
					}
					//F
					else if(x < w - 1 && y < h - 2 && image[y + 1][x] == '1' && image[y + 1][x + 1] == '1' && image[y + 2][x + 1] == '1'){
						std::cout << "F" << std::endl;
						y = h;
						break;
					}
					else{
						std::cout << "G" << std::endl;
						y = h;
						break;
					}
				}
			}
		}
	}

	return 0;
}
