Language: C++

#include <iostream>
#include <string>
using namespace std;

const double EPS = 1.0e-6;

int main()
{
	while(1){
		string all[8];
		bool endflg = false;
		for(int i=0; i<8; i++){
			if(!(cin>>all[i])) endflg = true;
			if(endflg) break;
		}
		if(endflg) break;

		for(int i=0; i<7; i++){
			bool breakflg = false;
			for(int j=0; j<7; j++){
				// ツ可。ツづ可個ゥツづゥ
				if(all[i][j]-'0'==1&&all[i][j+1]-'0'==1){
					if(all[i+1][j]-'0'==1&&all[i+1][j+1]-'0'==1){
						ans = "A";
					} else if(all[i+1][j]-'0'==0&&all[i+1][j+1]-'0'==0){
						ans = "C";
					} else if(all[i+1][j]-'0'==1&&all[i+1][j+1]-'0'==0){
						ans = "G";
					} else if(all[i+1][j]-'0'==0&&all[i+1][j+1]-'0'==1){
						ans = "E";
					}
					breakflg = true;
					break;
				}
				// ツ縦ツづ可個ゥツづゥ
				if(all[i][j]-'0'==1&&all[i+1][j]-'0'==1){
					if(all[i][j+1]-'0'==1&&all[i+1][j+1]-'0'==1){
						ans = "A";
					} else if(all[i][j+1]-'0'==0&&all[i+1][j+1]-'0'==0){
						ans = "B";
					} else if(all[i][j+1]-'0'==1&&all[i+1][j+1]-'0'==0){
						ans = "D";
					} else if(all[i][j+1]-'0'==0&&all[i+1][j+1]-'0'==1){
						ans = "F";
					}
					breakflg = true;
					break;
				}
			}
			if(breakflg) break;
		}
		cout<<ans<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |                                                 ans = "A";
      |                                                 ^~~
      |                                                 abs
a.cc:26:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |                                                 ans = "C";
      |                                                 ^~~
      |                                                 abs
a.cc:28:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |                                                 ans = "G";
      |                                                 ^~~
      |                                                 abs
a.cc:30:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |                                                 ans = "E";
      |                                                 ^~~
      |                                                 abs
a.cc:38:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |                                                 ans = "A";
      |                                                 ^~~
      |                                                 abs
a.cc:40:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   40 |                                                 ans = "B";
      |                                                 ^~~
      |                                                 abs
a.cc:42:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |                                                 ans = "D";
      |                                                 ^~~
      |                                                 abs
a.cc:44:49: error: 'ans' was not declared in this scope; did you mean 'abs'?
   44 |                                                 ans = "F";
      |                                                 ^~~
      |                                                 abs
a.cc:52:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   52 |                 cout<<ans<<endl;
      |                       ^~~
      |                       abs