#include <bits/stdc++.h>
using namespace std;
int n = 10, m = 10;
int main (){
	while (true) {
		string feedback;
		int command;
		cout << command << endl;
		cin >> feedback;
		int all_explored;
		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 << '.';
				}
				cout << endl;
			}
			break;
		}
	}
	return 0;
}