Black-and-white cube
You are given a cube with dimensions (k k k), composed of unit cubes. Two unit cubes are considered adjacent if they share a face.
Your task is to color each of the (k^3) unit cubes using one of two colors: black or white. The coloring must satisfy the following conditions:
Each white cube must have exactly 2 adjacent cubes that are also white.
Each black cube must have exactly 2 adjacent cubes that are also black.
Input
The input consists of a single integer (k) ((1 k 100)) — the size of the cube.
Output
If no valid coloring exists, output -1. Otherwise, provide the coloring of the cube layer by layer. For the first k lines, output the (k k) matrix representing the first layer of the cube. For the next k lines, output the (k k) matrix for the second layer, and continue in this manner until the k-th and final layer.
Use the symbol "w" to denote a white unit cube and "b" for a black unit cube. Follow the output format as demonstrated in the test examples.