#include<bits/stdc++.h>
using namespace std;
const int N=1e2+5;
int map[N][N];
int main(){
	int command=;
	string feedback;
	while (cin>>feedback) {
		
		command = "N";
		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; 
		}
	}
	return 0;
}