#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,m,command,all_explored,map;
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;
}
cout << endl;
}
break; 
} 
}
}