#include <bits/stdc++.h>
#include "testlib.h"
using namespace std;
int w[3010][3010], T[3010];
int main(int argc, char **argv) {
registerGen(argc, argv, 1);
int n = atoi(argv[1]);
printf("%d\n", n);
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
int ck = 0;
if (i >= n - 3) {
ck = (j - i) % 2;
}
else if(j >= n - 3) {
ck = 0;
}
else {
ck = rnd.next(0, 1);
}
w[i][j] = ck, w[j][i] = 1-ck;
}
}
int i;
for (i = 0; i < n; i++)T[i] = i;
//shuffle(T, T + n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
printf("%c", i == j ? '-' : "LW"[w[T[i]][T[j]]]);
}
puts("");
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlICJ0ZXN0bGliLmgiCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IHdbMzAxMF1bMzAxMF0sIFRbMzAxMF07CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpIHsKCXJlZ2lzdGVyR2VuKGFyZ2MsIGFyZ3YsIDEpOwoKCglpbnQgbiA9IGF0b2koYXJndlsxXSk7CgoKCXByaW50ZigiJWRcbiIsIG4pOwoKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJZm9yIChpbnQgaiA9IGkgKyAxOyBqIDwgbjsgaisrKSB7CgkJCWludCBjayA9IDA7CgkJCWlmIChpID49IG4gLSAzKSB7CgkJCQljayA9IChqIC0gaSkgJSAyOwoJCQl9CgkJCWVsc2UgaWYoaiA+PSBuIC0gMykgewoJCQkJY2sgPSAwOwoJCQl9CgkJCWVsc2UgewoJCQkJY2sgPSBybmQubmV4dCgwLCAxKTsKCQkJfQoJCQl3W2ldW2pdID0gY2ssIHdbal1baV0gPSAxLWNrOwoJCX0KCX0KCglpbnQgaTsKCWZvciAoaSA9IDA7IGkgPCBuOyBpKyspVFtpXSA9IGk7CgkvL3NodWZmbGUoVCwgVCArIG4pOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlmb3IgKGludCBqID0gMDsgaiA8IG47IGorKykgewoJCQlwcmludGYoIiVjIiwgaSA9PSBqID8gJy0nIDogIkxXIlt3W1RbaV1dW1Rbal1dXSk7CgkJfQoJCXB1dHMoIiIpOwoJfQp9Cg==