#include <bits/stdc++.h>

using namespace std;

char map[20][20];

int main()
{
	string command , start;
	string feedback;
	command = "LEFT";
	cout << command << endl; 
	cin >> feedback;
	if (feedback == "E") start = "S";
	else if (feedback == "W") start = "N";
	else if (feedback == "S") start = "E";
	else start = "E";
	command = "LEFT";
	cout << command << endl; 
	cin >> feedback;
	bool all_explored = false;
	while (true) {
		command = "GO"; 
		cout << command << endl; 
		cin >> feedback; 
		if (all_explored) { 
			cout << "END" << endl;
			cout << n << " " << m << endl;
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					cout << map[i][j];
				}
			cout << endl;
			}
			break; 
		} else {
			if ()
		}
	}
	return 0;
}