#include <cstdio>
#include <cassert>

using namespace std;

int main(int argc,char** argv){
	assert(argc >= 2);
	int n;
	assert(sscanf(argv[1],"%d",&n) == 1);
	printf("%d\n",n);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) 
			printf("%c", 'W');
		printf("\n");
	}
	return 0;
}