#include<bits/stdc++.h>
using namespace std;
const int N=120;
char map[N][N];
bool vis[N][N];
int dx[4]={-1,0,0,1};
int dy[4]={0,-1,1,0};
int n,m;
int main()
{
	int x=60,y=60;
	vis[x][y]=true;
	while(1){
		string feedback;
		string command;
		\for(int i=0;i<4;i++){
			int tx=x+dx[i];
			int ty=y+dy[i];
			if(tx>=0&&tx<)
		\}
		cout<<command<<endl;
		cin>>feedback;
		if(all_explored()==true){
			cout<<"END\n"<<n<<" "<<m<<"\n";
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					cout<<map[i][j];
				}
				cout<<"\n";
			}
			break;
		}else{
			\
		}
	}
	return 0;
}