#include<bits/stdc++.h>
using namespace std;
char a[4]={'N','W','S','E'};
int f[1005];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	
	memset(f,0,sizeof(f)); 
	while(true)
	{
		for(int i=1; i<=8; i++){
			string s;
			cin>>s;
		}
		for(int i=1; i<=4; i++)
		{
			f[i]=0;
		}
		if(f[1]==0&&f[2]==0&&f[3]==0&&f[4]==0){
			cout<<3<<' '<<3<<'\n';
			cout<<"LEFT"<<'\n'<<"GO"<<'\n';
			cout<<"LEFT"<<'\n'<<"GO"<<'\n';
			cout<<"LEFT"<<'\n'<<"GO"<<'\n';
			cout<<"LEFT"<<'\n'<<"GO"<<'\n';
			for(int i=1; i<=3; i++)
			{
				for(int j=1; j<=3; j++)
				{
					if(i==2&&j==2) cout<<'.';
					else cout<<'#';
				}
				cout<<endl;
			}	
		}
		
	}
	
	return 0;
}