#include<bits/stdc++.h>
using namespace std;
int map[10005][10005];
int main(){
	int command;
	while (true) {
	    string feedback;
    	command = get_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];            กข
				}           
    cout << endl;      
    } 
	break; 
    } else { 
    	cout<<command<<endl; 
	}  
	}                     
	return 0;
}