#include<bits/stdc++.h> using namespace std; char command,feedback; int a[105][105]; int main(){ while (true) { command='left'; cout<<command<<endl; cin<<feedback; if(all_explored){ cout<<"END"<<endl; cout<<10<<" "<<10<<endl; for(int i = 0; i < n; i++) { for(int j = 0; j < m; j++) { cout<<a[i][j]; } cout<<endl; } }else{ cout<<command<<endl; cin>>feedback; feedback=get_feedback(command); if(feedback!='FAIL'){ cout<<command; } } }