#include<bits/stdc++.h> using namespace std; long a,b,q[1000010],j,z; int m[10010]; int ans,ans1,ans2,ans3; int main(){ 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]; } cout << endl; } break; // } else {... // } } return 0; }