#include<bits/stdc++.h>
using namespace std;
int map[102][102];
int main(){
	while(true){
		string feedback,command;
		cin>>command;
		cout<<command<<endl;
		feedback=get_feedback(command);
		cout<<feedback<<endl;
		
		if(all explored){
			cout<<"END";
			cout<<n<<" "<<m<<endl;
			for(int i=0;i<n;i++){
				for(int j=0;j<m;j++){
					cout<<map[i][j];
				}
				cout<<endl;
			}
			break;
		}else{
			continue;
		}
	return 0;
}