#include<bits/stdc++.h>
using namespace std;
int arr[110][110],x=55,y=55;
int main()
{
	string str;
	int a=0,b=0,n;
	char f;
	arr[x][y]=1;
	while(true){
		a+=1;
		if(b==0)cout<<"LEFT"<<endl;
		else{
			cout<<"GO"<<endl;
			b=0;
			a=0;
		}
		cin>>str;
		f=str[0];
		cout<<"GO"<<endl;
		cin>>str;
		if(str=="SUCC"){
			if(f=='W')x+=1;
			if(f=='E')x-=1;
			if(f=='N')y+=1;
			if(f=='S')y-=1;
			b++;
		}
		arr[x][y]=1;
		if(a==4&&b==0){
			cout<<"END"<<endl;
			n=3;
			break;
		}
	}
	cout<<n<<" "<<n<<endl;
	for(int i=55-1;i<=55+1;i++){
		for(int j=55-1;j<=55+1;j++){
			if(arr[i][j]==0){
				cout<<"#";
			}
			else{
				cout<<".";
			}
		}
		cout<<endl;
	}
	return 0;
}