#include<bits/stdc++.h>
using namespace std;
char a[120][120];
int main(){
	string s;
	int f=0;
	int w=1;
	int i=60,j=60;
while(s!="end"){
	if(f==0){
		cout<<"LEET"<<endl;
	}
	else{
		cout<<"GO"<<endl;
	}
	cin>>s;
	if(f==0){
		if(s=="e"){
			w=1;
		}
		else if(s=="w"){
			w=2;
		}
		else if(s=="s"){
			w=3;
		}
		else{
			w=4;
		}
	    f=1;
	}
	else{
		if(s=="FAIL"){
			if(w==1){
				a[i+1][j]='#';
			}
			else if(w==2){
				a[i][j-1]='#';
			}
			else if(w==3){
				a[i-1][j]='#';
			}
			else{
				a[i][j+1]='#';
			}
		}
		else{
			if(w==1){
				a[i+1][j]='.';
				i++;
			}
			else if(w==2){
				a[i][j-1]='.';
				j--;
			}
			else if(w==3){
				a[i-1][j]='.';
				i--;
			}
			else{
				a[i][j+1]='.';
				j++;
			}
		}
		f=0;
	}
}
int d=0,l,r;
for(int i=1;i<=120;i++){
	for(int j=1;j<=120;j++){
		if(a[i][j]==' '){
			int x=0,y=0,z=0,o=0;
			for(int k=j-1;k>=1;k--){
				if(a[i][k]!=' '){
					x++;
				}
				else{
					break;
				}
			}
			for(int k=j+1;k<=120;k++){
				if(a[i][k]!=' '){
					y++;
				}
				else{
					break;
				}
			}
			for(int k=i+1;k<=120;k++){
				if(a[k][j]!=' '){
					z++;
				}
				else{
					break;
				}
			}
			for(int k=i-1;k>=1;k--){
				if(a[k][j]!=' '){
					o++;
				}
				else{
					break;
				}
			}
			x=min(x,y);
			x=min(x,z);
			x=min(x,o);
			if(x>d){
				d=x;
		        l=i;
		        r=j;
			}
		}
	}
}
cout<<d<<" "<<d;
for(int i=l-d+1;i<=l+d-1;i++){
	for(int j=r-d+1;j<=r+d-1;j++){
		cout<<a[i][j];
	}
	cout<<endl;
} 
	return 0;
}