#include <bits/stdc++.h>

using namespace std;

int main(){
	int n,m,map[10][10];
	while (true){
		string feedback;
		int command=n;
		cout << command << endl;
		cin >> feedback;
		if(all_exlored){
			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];
				}
				cout << endl;
			}
			break;
		}
		
	}	
	
	
	
	return 0;
}