#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
while(cin>>n){
if(n<=4) cout<<"-1"<<endl;
else if(n%2==0){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(j==0||j==n-1||i==j&&i<(n/2)||j==n-1-i&&i<(n/2)) cout<<"W ";
else cout<<" ";
}
cout<<endl;
}
cout<<endl;
}
else{
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(j==0||j==n-1||i==j&&i<=(n/2)||j==n-1-i&&i<(n/2)) cout<<"W ";
else cout<<" ";
}
cout<<endl;
}
cout<<endl;
}
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCl7CiAgICBpbnQgbjsKICAgIHdoaWxlKGNpbj4+bil7CiAgICAgICAgCiAgICAgICAgaWYobjw9NCkgY291dDw8Ii0xIjw8ZW5kbDsKICAgICAgICBlbHNlIGlmKG4lMj09MCl7CiAgICAgICAgICAgIGZvcihpbnQgaT0wO2k8bjtpKyspewoJICAgICAgICAgICAgZm9yKGludCBqPTA7ajxuO2orKyl7CiAgICAgICAgICAgICAgICBpZihqPT0wfHxqPT1uLTF8fGk9PWomJmk8KG4vMil8fGo9PW4tMS1pJiZpPChuLzIpKSBjb3V0PDwiVyAiOwogICAgICAgICAgICAgICAgCgkJICAgICAgICBlbHNlIGNvdXQ8PCIgICI7CgkgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBjb3V0PDxlbmRsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvdXQ8PGVuZGw7CiAgICAgICAgfQogICAgICAgIGVsc2V7CiAgICAgICAgICAgIGZvcihpbnQgaT0wO2k8bjtpKyspewoJICAgICAgICAgICAgZm9yKGludCBqPTA7ajxuO2orKyl7CiAgICAgICAgICAgICAgICBpZihqPT0wfHxqPT1uLTF8fGk9PWomJmk8PShuLzIpfHxqPT1uLTEtaSYmaTwobi8yKSkgY291dDw8IlcgIjsKCQkgICAgICAgIGVsc2UgY291dDw8IiAgIjsKCSAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvdXQ8PGVuZGw7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY291dDw8ZW5kbDsKICAgICAgICB9CiAgICAgICAgCiAgICB9CiAgICByZXR1cm4gMDsKICAgIH0KICAgICAK