public class Main {
	
	// ideone doesn't support cmd args
	static final String[] ARGS = {"5"};
	
	public static void main (String[] args) {
		int n = Integer.parseInt(ARGS[0]);
		for (int i = 0; i < n; i++) {
			System.out.print('N');
			for (int j = 1; j < n-1; j++) {
				System.out.print(j == i ? 'N' : ' ');
			}
			System.out.println('N');
		}
	}
}