Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	var scanner = bufio.NewScanner(os.Stdin)
	board := make([][]int, 8)
	for i := range board {
		board[i] = make([]int, 8)
			for j := range board[i] {
				board[i][j] = 0
			}
	}
	var ans string
	for scanner.Scan() {
		tmp := strings.Split(scanner.Text(), "")
		for i := 0; i < 8; i++ {
			board[0][i], _ = strconv.Atoi(tmp[i])
		}
		for i := 1; i < 8; i++ {
			scanner.Scan()
			row := strings.Split(scanner.Text(), "")
			for j := 0; j < 8; j++ {
				board[i][j], _ = strconv.Atoi(row[j])
			}
		}
		fmt.Println(board)
		for i := 0; i < 7; i++ {
			for j := 0; j < 7; j++ {
				if board[i][j] == 1 && board[i+1][j] == 1 && board[i][j+1] == 1 && board[i+1][j+1] == 1 {
					ans = "A"
				}
			}
		}
		for i := 0; i < 5; i++ {
			for j := 0; j < 8; j++ {
				if board[i][j] == 1 && board[i+1][j] == 1 && board[i+2][j] == 1 && board[i+3][j] == 1 {
					ans = "B"
				}
			}
		}
		for i := 0; i < 8; i++ {
			for j := 0; j < 5; j++ {
				if board[i][j] == 1 && board[i][j+1] == 1 && board[i][j+2] == 1 && board[i][j+3] == 1 {
					ans = "C"
				}
			}
		}
		for i := 0; i < 6; i++ {
			for j := 0; j < 7; j++ {
				if board[i][j+1] == 1 && board[i+1][j] == 1 && board[i+1][j+1] == 1 && board[i+2][j] == 1 {
					ans = "D"
				}
			}
		}
		for i := 0; i < 7; i++ {
			for j := 0; j < 6; j++ {
				if board[i][j] == 1 && board[i][j+1] == 1 && board[i+1][j+1] == 1 && board[i+1][j+2] == 1 {
					ans = "E"
				}
			}
		}
		for i := 0; i < 7; i++ {
			for j := 0; j < 6; j++ {
				if board[i][j+1] == 1 && board[i][j+2] == 1 && board[i+1][j] == 1 && board[i+1][j+1] == 1 {
					ans = "G"
				}
			}
		}
		for i := 0; i < 6; i++ {
			for j := 0; j < 7; j++ {
				if board[i][j] == 1 && board[i+1][j] == 1 && board[i+1][j+1] == 1 && board[i+2][j+1] == 1 {
					ans = "F"
				}
			}
		}
		fmt.Println(ans)
	}
}

C++: #include<iostream>
#include<string>
using namespace std;

int main()
{
    while(true){
        int i=0;
        string map[8];
        while(cin>>map[i],!cin.eof()){
            i++;
            if(i==8){
                break;
            }
        }
        if(cin.eof()){
            break;
        }
        for(int i=0;i<8;i++){
            for(int j=0;j<8;j++){
                if(i<7 && j<7){
                    if(map[i][j]=='1' && map[i][j+1]=='1' && map[i+1][j]=='1' && map[i+1][j+1]=='1'){
                        cout<<'A'<<endl;
                    }
                }
                if(i<5){
                    if(map[i][j]=='1' && map[i+1][j]=='1' && map[i+2][j]=='1' && map[i+3][j]=='1'){
                        cout<<'B'<<endl;
                    }
                }
                if(j<5){
                    if(map[i][j]=='1' && map[i][j+1]=='1' && map[i][j+2]=='1' && map[i][j+3]=='1'){
                        cout<<'C'<<endl;
                    }
                }
                if(j>0 && i<6){
                    if(map[i][j]=='1' && map[i+1][j]=='1' && map[i+1][j-1]=='1' && map[i+2][j-1]=='1'){
                        cout<<'D'<<endl;
                    }
                }
                if(i<7 && j<6){
                    if(map[i][j]=='1' && map[i][j+1]=='1' && map[i+1][j+1]=='1' && map[i+1][j+2]=='1'){
                        cout<<'E'<<endl;
                    }
                }
                if(i<6 && j<7){
                    if(map[i][j]=='1' && map[i+1][j]=='1' && map[i+1][j+1]=='1' && map[i+2][j+1]=='1'){
                        cout<<'F'<<endl;
                    }
                }
                if(i<7 && j>1){
                    if(map[i][j]=='1' && map[i][j-1]=='1' && map[i+1][j-1]=='1' && map[i+1][j-2]=='1'){
                        cout<<'G'<<endl;
                    }
                }
                else{
                    cout<<"other"<<endl;
                }
            }
        }
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
using namespace std;

string field[8];

bool ch(int i,int j)
{
	if(field[i][j] == '1') return true;
	return false;
}

bool Check_A(int i,int j)
{
	if(i+1 < 8 && j+1 < 8)
	{
		if(ch(i,j) && ch(i+1,j) && ch(i,j+1) && ch(i+1,j+1))  return true;
	}
	return false;
}

bool Check_B(int i,int j)
{
	if(i+1 < 8 && i+2 < 8 && i+3 < 8)
	{
		if(ch(i,j) && ch(i+1,j) && ch(i+2,j) && ch(i+3,j)) return true;
	}
	return false;
}

bool Check_C(int i,int j)
{
	if(j+1 < 8 && j+2 < 8 && j+3 < 8)
	{
		if(ch(i,j) && ch(i,j+1) && ch(i,j+2) && ch(i,j+1)) return true;
	}
	return false;
}

bool Check_D(int i,int j)
{
	if(j-1 > 0 && i+1 < 8 && i+2 < 8)
	{
		if(ch(i,j) && ch(i+1,j) && ch(i+2,j) && ch(i,j-1)) return true;
	}
	return false;
}

bool Check_E(int i,int j)
{
	if(i+1 < 8 && j+1 < 8 && j+2 < 8)
	{
		if(ch(i,j) && ch(i,j+1) && ch(i+1,j+1) && ch(i+1,j+2)) return true;
	}
	return false;
}

bool Check_F(int i,int j)
{
	if(i+1 < 8 && i+2 < 8 && i+3 < 8)
	{
		if(ch(i,j) && ch(i+1,j) && ch(i+1,j+1)&& ch(i+2,j+1)) return true;
	}
	return false;
}

bool Check_G(int i,int j)
{
	if(i+1 < 8 && j+1 < 8 && j-1 > 0)
	{
		if(ch(i,j) && ch(i+1,j) && ch(i,j+1) && ch(i+1,j-1)) return true;
	}
	return false;
}

int main()
{
	while(true)
	{
		if(cin.eof()) break;

		for(int i=0;i<8;i++)
		{
			cin >> field[i];
		}
		
		bool flag = true;
		for(int i=0;i<8;i++)
		{
			for(int j=0;j<8;j++)
			{
				if(Check_A(i,j) && flag)
				{
					cout << "A" << endl;
					flag = false;
				}

				if(Check_B(i,j) && flag)
				{
					cout << "B" << endl;
					flag = false;
				}

				if(Check_C(i,j) && flag)
				{
					cout << "C" << endl;
					flag = false;
				}

				if(Check_D(i,j) && flag)
				{
					cout << "D" << endl;
					flag = false;
				}				

				if(Check_E(i,j) && flag)
				{
					cout << "E" << endl;
					flag = false;
				}

				if(Check_F(i,j) && flag)
				{
					cout << "F" << endl;
					flag = false;
				}

				if(Check_G(i,j) && flag)
				{
					cout << "G" << endl;
					flag = false;
				}
			}
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

int main()
{
	int dx[7][3] = 
	{
		{ 1, 0, 1 },
		{ 0, 0, 0 },
		{ 1, 2, 3 },
		{ -1, 0, -1 },
		{ 1, 1, 2 },
		{ 0, 1, 1 },
		{ 1, -1, 0 }
	};
	int dy[7][3] =
	{
		{ 0, 1, 1 },
		{ 1, 2, 3 },
		{ 0, 0, 0 },
		{ 1, 1, 2 },
		{ 0, 1, 1 },
		{ 1, 1, 2 },
		{ 0, 1, 1 },
	};

	char bb[256];
	char* next = (char*)1;
	while (next)
	{
		char buf[8][8];
		int i;
		for (i = 0; i < 8; ++i)
		{
			if (fgets(bb, 256, stdin) == NULL)
				break;
			for (int j = 0; j < 8; ++j)
				buf[i][j] = bb[j];
		}
		next = fgets(bb, 256, stdin);
		if (i != 8)
			break;

		int x, y;
		for (y = 0; y < 8; ++y)
		{
			for (x = 0; x < 8; ++x)
			{
				if (buf[y][x] == '1')
					break;
			}
			if (buf[y][x] == '1')
				break;
		}

		for (i = 0; i < 7; ++i)
		{
			int j;
			for (j = 0; j < 3; ++j)
			{
				int tx = x+dx[i][j];
				int ty = y+dy[i][j];
				if (tx < 0 || ty < 0 || tx >= 8 || ty >= 8
					|| buf[ty][tx] == '0')
					break;
			}
			if (j == 3)
			{
				break;
			}
		}
		printf("%c\n", "ABCDEFG"[i]);
	}

	return 0;
}