#include<bits/stdc++.h>
using namespace std;
char c[500][500];
int e=200,w=200,s=200,n=200;
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	for(int i=0;i<=499;i++)
	{
		for(int j=0;j<=499;j++)
		{
			c[i][j]='@';
		}
	}
	string p;
	cout << "right" << endl;
	cin>>p;
	int x=200,y=200;
	string k=p;
	
	int i=7;
	while(i)
	{
		i--;
			cout << "go" << endl;
			c[x][y]='.';
			cin>>p;
			if(p=="FAIL")
			{
				if(k=="e")
				{
					c[x][y+1]='#';
				}
				if(k=="w")
				{
					c[x][y-1]='#';
				}
				if(k=="s")
				{
					c[x+1][y]='#';
				}
				if(k=="n")
				{
					c[x-1][y]='#';
				}
				cout << "right" << endl;
				cin>>p;
				k=p;
			}

			if(p=="SUCC")
			{
				if(k=="e")
					y++;
				if(k=="w")
				{
					y--;
				}
				if(k=="s")
				{
					x++;
				}
				if(k=="n")
				{
					x--;
				}
			}
			e=max(e,y);
			w=min(w,y);
			s=max(s,x);
			n=min(n,x);
	}
	e++;
	w--;
	s++;
	n--;
	cout<<"END"<<endl;
	cout<<s-n+1<<" ";
	cout<<e-w+1<<endl;
	for(int i=w;i<=e;i++)
	{
		for(int j=n;j<=s;j++)
		{
			if(c[i][j]=='@')
			{
				cout<<'#';
			}
			else
			{
				cout<<c[i][j];
			}
		}
		cout<<endl;
	}
	return 0;
 }