#include <bits/stdc++.h>
using namespace std;
#define map map1
char map[15][15];
int main()
{
	string command;
	string feedback;
	bool all_explored=false;
	int n,m;
	while (true) {
		string feedback;
 		command = "";
 		cout << command << endl;
		cin >> feedback;
		if (all_explored) { 
			cout << "END" << endl; 
			cout << n << " " << m << endl; 
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
				 	cout << map[i][j]; 
				}
			}
			break;
		}
		else
		{
			
		}
	}
	return 0;
}