Language: C++

#include <iostream>
#include <string>

using naemsapce std;

int main(){
	string s[8];
	while(true){
		bool end = false;
		for(int i=0;i<8;i++){
			if(!(cin >> s[i])) end = true;
		}
		if(end) break;
		for(int i=0;i<8&&!end;i++){
			for(int j=0;j<8&&!end;j++){
				if(s[i][j]=='1'){
					if(i+3<8&&s[i+3][j]=='1') cout << "B" << endl;
					else if(j+3<8&&s[i][j+3]=='1') cout << "C" << endl;
					else if(i+2<8&&0<=j-1&&s[i+2][j-1]=='1') cout << "D" << endl;
					else if(i+1<8&&j+2<8&&s[i+1][j+2]=='1') cout << "E" << endl;
					else if(i+2<8&&j+1<8&&s[i+2][j+1]=='1') cout << "F" << endl;
					else if(i+1<8&&0<=j-1&&s[i+1][j-1]=='1') cout << "G" << endl;
					else cout << "A" << endl;
					end = true;
				}
			}
		}
	}
}

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'naemsapce'
    4 | using naemsapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s[8];
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:11:30: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |                         if(!(cin >> s[i])) end = true;
      |                              ^~~
      |                              std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:37: error: 's' was not declared in this scope
   11 |                         if(!(cin >> s[i])) end = true;
      |                                     ^
a.cc:16:36: error: 's' was not declared in this scope
   16 |                                 if(s[i][j]=='1'){
      |                                    ^
a.cc:17:67: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |                                         if(i+3<8&&s[i+3][j]=='1') cout << "B" << endl;
      |                                                                   ^~~~
      |                                                                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:82: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |                                         if(i+3<8&&s[i+3][j]=='1') cout << "B" << endl;
      |                                                                                  ^~~~
      |                                                                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:18:72: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |                                         else if(j+3<8&&s[i][j+3]=='1') cout << "C" << endl;
      |                                                                        ^~~~
      |                                                                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:87: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |                                         else if(j+3<8&&s[i][j+3]=='1') cout << "C" << endl;
      |                                                                                       ^~~~
      |                                                                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:19:82: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |                                         else if(i+2<8&&0<=j-1&&s[i+2][j-1]=='1') cout << "D" << endl;
      |                                                                                  ^~~~
      |                                                                                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:97: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |                                         else if(i+2<8&&0<=j-1&&s[i+2][j-1]=='1') cout << "D" << endl;
      |                                                                                                 ^~~~
      |                                                                                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:20:81: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |                                         else if(i+1<8&&j+2<8&&s[i+1][j+2]=='1') cout << "E" << endl;
      |                                                                                 ^~~~
      |                                                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:96: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |                                         else if(i+1<8&&j+2<8&&s[i+1][j+2]=='1') cout << "E" << endl;
      |                                                                                                ^~~~
      |                                                                                                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:21:81: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                                         else if(i+2<8&&j+1<8&&s[i+2][j+1]=='1') cout << "F" << endl;
      |                                                                                 ^~~~
      |                                                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:96: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |                                         else if(i+2<8&&j+1<8&&s[i+2][j+1]=='1') cout << "F" << endl;
      |                                                                                                ^~~~
      |                                                                                                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:22:82: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |                                         else if(i+1<8&&0<=j-1&&s[i+1][j-1]=='1') cout << "G" << endl;
      |                                                                                  ^~~~
      |                                                                                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:22:97: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |                                         else if(i+1<8&&0<=j-1&&s[i+1][j-1]=='1') cout << "G" << endl;
      |                                                                                                 ^~~~
      |                                                                                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:23:46: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |                                         else cout << "A" << endl;
      |                                              ^~~~
      |                                              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:61: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |                                         else cout << "A" << endl;
      |                                                             ^~~~
      |                                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~