#include <bits/stdc++.h>
using namespace std;
char a[110][110];
int main()
{
	string command;
	string c;
	int x = 50, y = 50;
	a[x][y] = '.';
	int cnt = 0;
	cout << "LEFT" << endl;
	bool flag = 1;
	while (1)
	{
		string feedback;
		cin >> feedback;
		if (flag == 1) command = "GO";
		else command = "LEFT";
		cout << command << endl;
		if (feedback == "N" || feedback == "S" || feedback == "E" || feedback == "W") c = feedback;
		else if (feedback == "SUCC") 
		{
			cnt = 0;
			if (c == "N") 
			{
				x--;
				a[x][y] = '.';
			}
			else if (c == "S")
			{
				x++;
				a[x][y] = '.';
			}
			else if (c == "E")
			{
				y++;
				a[x][y] = '.';
			}
			else
			{
				y--;
				a[x][y] = '.';
			}
		}
		else
		{
			flag = 0;
			cnt++;
			if (c == "N") 
			{
				x--;
				a[x][y] = '#';
			}
			else if (c == "S")
			{
				x++;
				a[x][y] = '#';
			}
			else if (c == "E")
			{
				y++;
				a[x][y] = '#';
			}
			else
			{
				y--;
				a[x][y] = '#';
			}
		}
		if (cnt == 4)
		{
			cout << "END" << endl;
			cout << x << " " << y << endl;
			for (int i = 0; i < x; i++) {
				for (int j = 0; j < y; j++) {
					cout << a[i][j];
				}
				cout << endl;
			}
			break;
		}
	}
	return 0;
}