#include <bits/stdc++.h>
using namespace std;
int N;
int A[110][110][110];
int main() {
  scanf("%d", &N);
  if (N % 2 != 0) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i <= N; i++) {
    int p = (i & 1);
    for (int j = 1; j <= N; j += 2) {
      for (int k = 1; k <= N; k += 2) {
        A[i][j][k] = A[i][j][k + 1] = A[i][j + 1][k] = A[i][j + 1][k + 1] = p;
        p = 1 - p;
      }
      if (N % 4 == 0) p = 1 - p;
    }
  }
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= N; j++) {
      for (int k = 1; k <= N; k++) {
        if (A[i][j][k] == 0)
          printf("w");
        else
          printf("b");
      }
      puts("");
    }
  }
  return 0;
}
