You are given a chess board with $n$ rows and $n$ columns. Initially all cells of the board are empty, and you have to put a white or a black knight into each cell of the board.

A knight is a chess piece that can attack a piece in cell ($x_2$, $y_2$) from the cell ($x_1$, $y_1$) if one of the following conditions is met:

  $|x_1 - x_2| = 2$ and $|y_1 - y_2| = 1$, or  $|x_1 - x_2| = 1$ and $|y_1 - y_2| = 2$. 

Here are some examples of which cells knight can attack. In each of the following pictures, if the knight is currently in the blue cell, it can attack all red cells (and only them).

 [Image] 

A duel of knights is a pair of knights of different colors such that these knights attack each other. You have to put a knight (a white one or a black one) into each cell in such a way that the number of duels is maximum possible.


-----Input-----

The first line contains one integer $n$ ($3 \le n \le 100$) — the number of rows (and columns) in the board.


-----Output-----

Print $n$ lines with $n$ characters in each line. The $j$-th character in the $i$-th line should be W, if the cell ($i$, $j$) contains a white knight, or B, if it contains a black knight. The number of duels should be maximum possible. If there are multiple optimal answers, print any of them.


-----Example-----
Input
3

Output
WBW
BBB
WBW



-----Note-----

In the first example, there are $8$ duels:

  the white knight in ($1$, $1$) attacks the black knight in ($3$, $2$);  the white knight in ($1$, $1$) attacks the black knight in ($2$, $3$);  the white knight in ($1$, $3$) attacks the black knight in ($3$, $2$);  the white knight in ($1$, $3$) attacks the black knight in ($2$, $1$);  the white knight in ($3$, $1$) attacks the black knight in ($1$, $2$);  the white knight in ($3$, $1$) attacks the black knight in ($2$, $3$);  the white knight in ($3$, $3$) attacks the black knight in ($1$, $2$);  the white knight in ($3$, $3$) attacks the black knight in ($2$, $1$).

Source: codeforces | Difficulty: EASY
Tags: Greedy algorithms

Constructive algorithms


Solutions:
import sys
import math
import bisect

def main():
	n = int(input())
	A = []
	for i in range(n):
		B = []
		for j in range(n):
			if (i + j) % 2 == 0:
				B.append('W')
			else:
				B.append('B')
		A.append(B)
	for i in range(n):
		print(''.join(A[i]))
main()


n = int(input())
for i in range(n):
	for j in range(n):
		if (i + j) % 2:
			print('B', end='')
		else:
			print('W', end='')
	print('')


from sys import stdin
from math import ceil, log
n = int(stdin.readline().strip())
st1 = []
st2 = []
for i in range(n):
	if i % 2:
		st1.append('W')
		st2.append('B')
	else:
		st1.append('B')
		st2.append('W')
st1 = ''.join(st1)
st2 = ''.join(st2)
counter = 1
for i in range(n):
	if i % 2 == 0:
		print(st1)
	else:
		print(st2)


from sys import stdin, stdout
n = int(stdin.readline())
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			stdout.write('W')
		else:
			stdout.write('B')
	stdout.write('\n')


n = int(input())
ans = 'WB'
for i in range(n):
	if i % 2:
		k = 0
	else:
		k = 1
	for j in range(n):
		print(ans[k], end='')
		k = (k + 1) % 2
	print('')


def att(i, j, r, c):
	return abs(i - r) == 2 and abs(j - c) == 1 or (abs(i - r) == 1 and abs(j - c) == 2)

def help(n, s):
	ans = ''
	while len(ans) < n:
		ans += s
	return ans
n = int(input())
x = []
while len(x) < n:
	x += [help(n, 'WBWBWB')]
	x += [help(n, 'BWBWBW')]
x = x[:n]
for i in range(len(x)):
	x[i] = x[i][:n]
for i in x:
	print(i)


n = int(input())
for i in range(n):
	if i % 2 == 0:
		if n % 2 == 1:
			print('WB' * (n // 2) + 'W')
		else:
			print('WB' * (n // 2))
	elif n % 2 == 1:
		print('BW' * (n // 2) + 'B')
	else:
		print('BW' * (n // 2))


n = int(input())
x = 'WB' * (n // 2) + 'W' * (n % 2)
y = 'BW' * (n // 2) + 'B' * (n % 2)
for i in range(n):
	if i % 2 == 0:
		print(x)
	else:
		print(y)


n = int(input())
flag = 0
for i in range(n):
	temp = ''
	if i % 2 == 0:
		for j in range(n):
			if j % 2 == 0:
				temp += 'W'
			else:
				temp += 'B'
	else:
		for j in range(n):
			if j % 2 == 0:
				temp += 'B'
			else:
				temp += 'W'
	print(temp)


n = int(input())

def max_knight_duals(pos):
	board[pos[0]][pos[1]] = 'W'
	Q = [(pos, 0)]
	dx = [1, -1, 1, -1, 2, -2, 2, -2]
	dy = [2, 2, -2, -2, 1, 1, -1, -1]
	while Q:
		(pos, depth) = Q.pop(0)
		for k in range(8):
			nx = pos[0] + dx[k]
			ny = pos[1] + dy[k]
			if 0 <= nx < n and 0 <= ny < n and (board[nx][ny] == '.'):
				board[nx][ny] = color[(depth + 1) % 2]
				Q.append(((nx, ny), depth + 1))
	return
board = [['.'] * n for _ in range(n)]
color = ['W', 'B']
for i in range(n):
	for j in range(n):
		if board[i][j] == '.':
			max_knight_duals((i, j))
for r in board:
	print(''.join(r))


n = int(input())
board = ''
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 == 0:
			board += 'W'
		else:
			board += 'B'
	board += '\n'
print(board)


n = int(input())
s = 'BW' * n
for i in range(n):
	print(s[i % 2:i % 2 + n])


fuad = int(input())
for i in range(fuad):
	for j in range(fuad):
		print('W' if (i + j) % 2 == 0 else 'B', end='')
	print()


n = int(input())
matrix = [['B'] * n for i in range(n)]
drc = [(1, -2), (2, -1), (2, 1), (1, 2), (-1, 2), (-2, 1), (-2, -1), (-1, -2)]

def get_children(x, y):
	global drc
	children = [(x + r, y + c) for (r, c) in drc if 0 <= x + r < n and 0 <= y + c < n]
	return children

def toggle_clr(x, y):
	if matrix[x][y] == 'B':
		return 'W'
	return 'B'

def dfs(matrix, x, y):
	visited = dict()
	stack = [(x, y)]
	visited[x, y] = True
	while stack:
		(x, y) = stack.pop()
		for (cx, cy) in get_children(x, y):
			if not (cx, cy) in visited:
				matrix[cx][cy] = toggle_clr(x, y)
				visited[cx, cy] = True
				stack.append((cx, cy))
dfs(matrix, 0, 0)
for i in range(n):
	print(''.join(matrix[i]))


n = int(input())
x = [''] * n
k = 'W'
for i in range(n):
	for j in range(n):
		x[i] += k
		k = 'W' if k == 'B' else 'B'
	if n % 2 == 0:
		k = 'W' if k == 'B' else 'B'
print('\n'.join(x))


n = int(input())
if n == 3:
	print('WBW')
	print('BBB')
	print('WBW')
else:
	for i in range(n):
		if i % 2 == 0:
			print('WB' * (n // 2) + 'W' * (n % 2))
		else:
			print('BW' * (n // 2) + 'B' * (n % 2))


n = int(input())
s = ''
t = ''
for j in range(n):
	if j % 2 == 0:
		s += 'W'
		t += 'B'
	else:
		s += 'B'
		t += 'W'
for j in range(n):
	if j % 2 == 0:
		print(s)
	else:
		print(t)


import sys
r = lambda : sys.stdin.readline().rstrip()
n = int(r())
x = ['W', 'B']
for i in range(n):
	row = ''
	for j in range(n):
		row += x[(j % 2 + i % 2) % 2]
	print(row)


num = int(input())
for x in range(num):
	z = num
	while z > 0:
		if z % 2 == 0 and x % 2 == 0:
			print('W', end='')
		elif z % 2 == 0 and x % 2 != 0:
			print('B', end='')
		elif z % 2 != 0 and x % 2 == 0:
			print('B', end='')
		else:
			print('W', end='')
		z -= 1
	print('')


n = int(input())
if n == 3:
	print('WBW\nBBB\nWBW', end='')
else:
	for i in range(n):
		for j in range(n):
			if (i + j) % 2 == 0:
				print('W', end='')
			else:
				print('B', end='')
		if i != n - 1:
			print()


n = int(input())
l = []
for i in range(n):
	s = ''
	for j in range(n):
		if (i + j) % 2 == 0:
			s += 'B'
		else:
			s += 'W'
	l.append(s)
for i in l:
	print(i)


n = int(input())
table = [['B'] * n for i in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			table[i][j] = 'W'
print('\n'.join([''.join(i) for i in table]))


n = int(input())
matrix = []
for i in range(0, n):
	matrix.append([])
	for j in range(0, n):
		if i % 2 == 0:
			if j % 2 == 0:
				matrix[i].append('W')
			else:
				matrix[i].append('B')
		elif j % 2 == 0:
			matrix[i].append('B')
		else:
			matrix[i].append('W')
for i in matrix:
	for j in i:
		print(j, end='')
	print()


n = int(input())
g = [['W' for _ in range(n)] for _ in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 1:
			g[i][j] = 'B'
		else:
			g[i][j] = 'W'
for i in range(n):
	print(''.join(g[i]))


n = int(input())
board = [['' for i in range(n)] for j in range(n)]
flag = 1
prev_flag = 1
for i in range(n):
	for j in range(n):
		if flag == 1:
			print('W', end='')
			flag = 0
		else:
			print('B', end='')
			flag = 1
	if prev_flag == 1:
		prev_flag = 0
		flag = 0
	else:
		prev_flag = 1
		flag = 1
	print()


n = int(input())
for i in range(n):
	if i % 2 == 0:
		first = 'W'
		sec = 'B'
	else:
		first = 'B'
		sec = 'W'
	for j in range(n):
		if j % 2 == 0:
			print(first, end='')
		else:
			print(sec, end='')
	print()


n = int(input())
s1 = ''
s2 = ''
for i in range(n):
	if i % 2 == 0:
		s1 += 'W'
		s2 += 'B'
	else:
		s1 += 'B'
		s2 += 'W'
for i in range(n):
	if i % 2 == 0:
		print(s1)
	else:
		print(s2)


n = int(input())
ans = []
for i in range(n):
	l = [0] * n
	ans.append(l)
i = 0
j = 0
queue = [(i, j)]
ans[i][j] = 'W'
while queue != []:
	(i, j) = queue.pop(0)
	if ans[i][j] != 0:
		d = 'W'
		if ans[i][j] == 'W':
			d = 'B'
		if i - 1 >= 0 and j - 2 >= 0:
			if ans[i - 1][j - 2] == 0:
				ans[i - 1][j - 2] = d
				queue.append((i - 1, j - 2))
		if i - 1 >= 0 and j + 2 < n:
			if ans[i - 1][j + 2] == 0:
				ans[i - 1][j + 2] = d
				queue.append((i - 1, j + 2))
		if i + 1 < n and j - 2 >= 0:
			if ans[i + 1][j - 2] == 0:
				ans[i + 1][j - 2] = d
				queue.append((i + 1, j - 2))
		if i + 1 < n and j + 2 < n:
			if ans[i + 1][j + 2] == 0:
				ans[i + 1][j + 2] = d
				queue.append((i + 1, j + 2))
		if i - 2 >= 0 and j - 1 >= 0:
			if ans[i - 2][j - 1] == 0:
				ans[i - 2][j - 1] = d
				queue.append((i - 2, j - 1))
		if i - 2 >= 0 and j + 1 < n:
			if ans[i - 2][j + 1] == 0:
				ans[i - 2][j + 1] = d
				queue.append((i - 2, j + 1))
		if i + 2 < n and j - 1 >= 0:
			if ans[i + 2][j - 1] == 0:
				ans[i + 2][j - 1] = d
				queue.append((i + 2, j - 1))
		if i + 2 < n and j + 1 < n:
			if ans[i + 2][j + 1] == 0:
				ans[i + 2][j + 1] = d
				queue.append((i + 2, j + 1))
for i in range(n):
	for j in range(n):
		if ans[i][j] == 0:
			ans[i][j] = 'B'
for i in ans:
	print(''.join(i))


n = int(input())
letters = ['W', 'B']
loop = False
for i in range(n):
	start = 0 if not loop else 1
	for y in range(n):
		print(letters[start], end='' if y != n - 1 else '\n')
		start = (start + 1) % 2
	loop = False if loop == True else True


def main():
	d = int(input())
	for i in range(d):
		print(''.join(['B' if (j + i) % 2 == 0 else 'W' for j in range(d)]))
main()


n = int(input())
L = []
temp = 0
for i in range(n):
	s = ''
	for j in range(n):
		if temp % 2 == 0:
			s += 'W'
		else:
			s += 'B'
		temp += 1
	if n % 2 == 0:
		temp += 1
	L.append(s)
for i in range(n):
	print(L[i])


from sys import setcheckinterval, stdin, setrecursionlimit
setcheckinterval(1000)
setrecursionlimit(10 ** 7)

def iin():
	return int(stdin.readline())

def lin():
	return list(map(int, stdin.readline().split()))
n = iin()
sol = []
sa = [1, 2]
ans = {1: 'W', 2: 'B'}
for i in range(n):
	if i % 2:
		sol.append([ans[sa[(j + 1) % 2]] for j in range(n)])
	else:
		sol.append([ans[sa[j % 2]] for j in range(n)])
for i in range(n):
	print(''.join(sol[i]))


n = int(input())
print('\n'.join(((('BW' if i % 2 else 'WB') * n)[:n] for i in range(n))))


def main():
	a = int(input())
	for i in range(a):
		for j in range(a):
			if (i + j) % 2 is 0:
				print('B', end='')
			else:
				print('W', end='')
		print('')
main()


from collections import deque
n = int(input())
board = [['E' for i in range(n)] for i in range(n)]
board[0][0] = 'W'
nextMove = deque()
nextMove.append((0, 0, 'W'))
counter = 0
while len(nextMove) and counter < n ** 2:
	current = nextMove.popleft()
	for (x1, y1) in [(1, 2), (2, 1), (-1, 2), (-2, 1), (1, -2), (2, -1), (-1, -2), (-2, -1)]:
		(x, y) = (current[0] + x1, current[1] + y1)
		if x >= 0 and x < n and (y >= 0) and (y < n):
			if board[x][y] == 'E':
				board[x][y] = 'B' if current[2] == 'W' else 'W'
				nextMove.append((x, y, board[x][y]))
				counter += 1
for x in range(n):
	for y in range(n):
		if board[x][y] == 'E':
			board[x][y] = 'B'
for row in board:
	print(''.join(row))


n = int(input())
res1 = ''
res2 = ''
for i in range(n):
	if i % 2 == 0:
		res1 += 'B'
	else:
		res1 += 'W'
for i in range(n):
	if i % 2 == 0:
		res2 += 'W'
	else:
		res2 += 'B'
print(res1)
print(res2)
for i in range(2, n):
	if i % 2 == 0:
		print(res1)
	else:
		print(res2)


import sys
board_size = int(input())
first_row = ''.join(['W' if i % 2 == 0 else 'B' for i in range(board_size)]) + '\n'
second_row = ''.join(['B' if i % 2 == 0 else 'W' for i in range(board_size)]) + '\n'
for n in range(board_size):
	if n % 2 == 0:
		sys.stdout.write(first_row)
	else:
		sys.stdout.write(second_row)
sys.stdout.flush()


n = int(input())
if n == 3:
	print('WBW')
	print('BBB')
	print('WBW')
	exit()
for i in range(n):
	if i % 2 == 0:
		for j in range(n):
			if j % 2 == 0:
				print('W', end='')
			else:
				print('B', end='')
	else:
		for j in range(n):
			if j % 2 == 0:
				print('B', end='')
			else:
				print('W', end='')
	print()


n = int(input())
flag = True
for j in range(n):
	for i in range(n):
		if flag:
			tp = 'B'
		else:
			tp = 'W'
		print(tp, end='')
		flag = not flag
	if j % 2 == 0:
		flag = False
	else:
		flag = True
	print()


a = int(input())
t = ''
r = ''
for i in range(a):
	if i % 2 == 0:
		t = t + 'W'
		r = r + 'B'
	else:
		t = t + 'B'
		r = r + 'W'
for i in range(a):
	if i % 2 == 0:
		print(r)
	else:
		print(t)


(N, X) = (int(input()), ['WB', 'BW'])
for i in range(N):
	print((X[i % 2] * N)[:N])


n = int(input())
for i in range(n):
	if i % 2 == 0:
		curr = 'WB' * (n // 2) + 'WB'[:n % 2]
	else:
		curr = 'BW' * (n // 2) + 'BW'[:n % 2]
	print(curr)


from sys import stdin, stdout
i = int(stdin.read())
for n in range(i):
	if n % 2 == 0:
		if i % 2 == 0:
			stdout.write(i // 2 * 'WB' + '\n')
		else:
			stdout.write(i // 2 * 'WB' + 'W' + '\n')
	elif i % 2 == 0:
		stdout.write(i // 2 * 'BW' + '\n')
	else:
		stdout.write(i // 2 * 'BW' + 'B' + '\n')


rows_number = int(input())
for i in range(rows_number):
	row = ''
	for j in range(rows_number):
		if (i + j) % 2 == 0:
			row += 'W'
		else:
			row += 'B'
	print(row)


from __future__ import print_function, division, unicode_literals
__metaclass__ = type
try:
	input = raw_input
	range = xrange
except NameError:
	pass
import sys
from typing import Tuple, List
import itertools as it
from copy import deepcopy

def ct_duels(N: int, G: List[List[bool]]) -> int:
	ct = 0
	for r0 in range(N):
		for c0 in range(N):
			if not G[r0][c0]:
				continue
			for mag in [(2, 1), (1, 2)]:
				for sgn in it.product([-1, +1], [-1, +1]):
					r = r0 + mag[0] * sgn[0]
					c = c0 + mag[1] * sgn[1]
					if 0 <= r < N and 0 <= c < N and (not G[r][c]):
						ct += 1
	return ct

def solve(N: int) -> Tuple[int, List[List[bool]]]:
	G = [[False] * N for _ in range(N)]
	for r in range(N):
		for c in range(N):
			G[r][c] = bool((r + c) % 2)
	return (ct_duels(N, G), G)

def main():
	N = int(input())
	(_, G) = solve(N)
	for r in range(N):
		print(''.join(('BW'[G[r][c]] for c in range(N))))
main()


n = int(input())
x = 'BW' * (n // 2 + 2)
for i in range(n):
	print(x[1:n + 1]) if i & 1 else print(x[:n])


n = int(input())
for i in range(n):
	print(('WB' * n)[i:][:n])


n = int(input())
arr1 = []
for i in range(n):
	if i % 2 == 0:
		arr1.append('W')
	else:
		arr1.append('B')
arr2 = []
for i in range(n):
	if i % 2 != 0:
		arr2.append('W')
	else:
		arr2.append('B')
for i in range(n):
	if i % 2 == 0:
		print(''.join(arr1))
	else:
		print(''.join(arr2))


n = int(input())
if n % 2 == 0:
	s = 'WB' * (n // 2)
	t = 'BW' * (n // 2)
else:
	s = 'WB' * (n // 2) + 'W'
	t = 'BW' * (n // 2) + 'B'
for i in range(n):
	if i % 2 == 0:
		print(s)
	else:
		print(t)


n = int(input())
x = []
a = ['W' if i % 2 == 0 else 'B' for i in range(n)]
b = ['B' if i % 2 == 0 else 'W' for i in range(n)]
for i in range(n):
	if i % 2 == 0:
		print(''.join(a))
	else:
		print(''.join(b))


n = int(input())
t = ('B', 'W')
m = '\n'.join((''.join((t[i % 2 - j % 2] for j in range(n))) for i in range(n)))
print(m)


n = int(input())
s = 'WB' * n
for i in range(n):
	print(s[i % 2:i % 2 + n])


n = int(input())
if n % 2 == 0:
	for i in range(n):
		C = []
		if i % 2 != 0:
			for k in range(n // 2):
				C.append('BW')
			print(*C, sep='')
		else:
			for j in range(n // 2):
				C.append('WB')
			print(*C, sep='')
else:
	for i in range(n):
		C = []
		if i % 2 != 0:
			for k in range((n - 1) // 2):
				C.append('BW')
			C.append('B')
			print(*C, sep='')
		else:
			for j in range((n - 1) // 2):
				C.append('WB')
			C.append('W')
			print(*C, sep='')


N = int(input())
for i in range(N):
	X = []
	for j in range(N):
		if (j + i) % 2 == 1:
			X.append('B')
		else:
			X.append('W')
	print(''.join(X))


import sys
import bisect as b
import math
from collections import defaultdict as dd
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def computeGCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = inin()
l = []
l1 = []
for i in range(n):
	if i % 2 == 0:
		l += ['W']
		l1 += ['B']
	else:
		l += ['B']
		l1 += ['W']
for j in range(n):
	if j % 2 == 0:
		print(''.join([str(i) for i in l]))
	else:
		print(''.join([str(i) for i in l1]))


N = int(input())
ans1 = ''
ans2 = ''
for i in range(N):
	if i & 1:
		ans1 += 'W'
		ans2 += 'B'
	else:
		ans1 += 'B'
		ans2 += 'W'
for i in range(N):
	if i & 1:
		print(ans1)
	else:
		print(ans2)


mod = 10 ** 9 + 7
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq
from random import randint as rn

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def cin():
	return map(int, input().split())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def mergeArrays(arr1, arr2, n1, n2):
	arr3 = [None] * (n1 + n2)
	i = 0
	j = 0
	k = 0
	while i < n1 and j < n2:
		if arr1[i] < arr2[j]:
			arr3[k] = arr1[i]
			k = k + 1
			i = i + 1
		else:
			arr3[k] = arr2[j]
			k = k + 1
			j = j + 1
	while i < n1:
		arr3[k] = arr1[i]
		k = k + 1
		i = i + 1
	while j < n2:
		arr3[k] = arr2[j]
		k = k + 1
		j = j + 1
	return arr3

def main():
	n = inin()
	for i in range(n):
		for j in range(n):
			if (i + j) % 2 == 1:
				print('W', end='')
			else:
				print('B', end='')
		print()
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
n = int(input())
a = [[0 for i in range(n)] for j in range(n)]
for i in range(n):
	if i % 2:
		ch = 'B'
	else:
		ch = 'W'
	for j in range(n):
		print(ch, end='')
		if ch == 'W':
			ch = 'B'
		else:
			ch = 'W'
	print()


grid = int(input())
for row in range(grid):
	print(''.join(['B' if (row + column) % 2 == 0 else 'W' for column in range(grid)]))


def determine(res, i, j):
	if i == j == 0:
		return 'W'
	elif j == 0:
		return 'W' if res[i - 1][j] == 'B' else 'B'
	else:
		return 'W' if res[i][j - 1] == 'B' else 'B'

def solve(n):
	res = [[''] * n for _ in range(n)]
	for i in range(n):
		for j in range(n):
			if not res[i][j]:
				now = determine(res, i, j)
				res[i][j] = now
			else:
				now = res[i][j]
			target = 'W' if now == 'B' else 'B'
			for (x, y) in [(2, 1), (2, -1), (-2, 1), (-2, -1), (1, 2), (1, -2), (-1, -2), (-1, 2)]:
				new_i = i + x
				new_j = j + y
				if 0 <= new_i < n and 0 <= new_j < n and (not res[new_i][new_j]):
					res[new_i][new_j] = target
	return res
num = int(input())
res = solve(num)
for line in res:
	print(''.join(line))


a = int(input())
cc = ['W', 'B']
for i in range(a):
	for j in range(a):
		print(cc[int(not i % 2 == j % 2)], end='')
	print(end='\n')


n = int(input())
ans = [[0] * n for i in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			ans[i][j] = 'B'
		else:
			ans[i][j] = 'W'
for i in ans:
	print(''.join(i))


n = int(input())
cambio = False
for i in range(n):
	for j in range(n):
		if cambio:
			if j % 2 == 0:
				print('B', end='')
			else:
				print('W', end='')
		elif j % 2 == 0:
			print('W', end='')
		else:
			print('B', end='')
	cambio = not cambio
	print('')


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def Factor(n):
	Ans = []
	d = 2
	while d * d <= n:
		if n % d == 0:
			Ans.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		Ans.append(n)
	return Ans
n = int(input())
for i in range(n):
	s = ''
	for j in range(n):
		if (i + j) % 2 == 0:
			s += 'W'
		else:
			s += 'B'
	print(s)


n = int(input())
grid = [None for _ in range(n)]
nextCell = 'W'
nextLine = 'W'
for i in range(0, n):
	grid[i] = [None for _ in range(n)]
	grid[i][0] = nextLine
	nextLine = 'W' if nextLine == 'B' else 'B'
	nextCell = nextLine
	for j in range(1, n):
		grid[i][j] = nextCell
		nextCell = 'W' if nextCell == 'B' else 'B'
for i in grid:
	for j in i:
		print(j, end='')
	print()


import sys, copy
n = int(sys.stdin.readline())
chess = [['W'] * n for _ in range(n)]
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
for i in range(n):
	for j in range(n):
		if chess[i][j] == 'W':
			for k in range(4):
				(nx, ny) = (i + dx[k], j + dy[k])
				if 0 <= nx < n and 0 <= ny < n:
					chess[nx][ny] = 'B'
for i in chess:
	print(''.join(i))


n = int(input())
ans = []
x1 = []
x2 = []
for i in range(0, n):
	if i % 2 == 0:
		x1.append('W')
	else:
		x1.append('B')
for i in range(0, n):
	if i % 2 == 0:
		x2.append('B')
	else:
		x2.append('W')
for i in range(0, n):
	if i % 2 == 0:
		ans.append(x1)
	else:
		ans.append(x2)
for i in range(0, n):
	for j in range(0, n):
		print(ans[i][j], end='')
	print()


import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline

def solve():
	N = int(input())
	grid = [[None] * N for _ in range(N)]
	grid[0][0] = 'B'
	Q = [[0, 0, 'B']]
	DX = [-2, -1, 1, 2, 2, 1, -1, 2]
	DY = [1, 2, 2, 1, -1, -2, -2, -1]
	while Q:
		tmp = []
		for (x, y, color) in Q:
			for (dx, dy) in zip(DX, DY):
				nx = x + dx
				ny = y + dy
				if 0 <= nx < N and 0 <= ny < N:
					if grid[nx][ny] is None:
						new_col = 'W' if color == 'B' else 'B'
						grid[nx][ny] = new_col
						tmp.append([nx, ny, new_col])
		Q = tmp
	ans = ''
	for row in range(N):
		for col in range(N):
			if grid[row][col] is None:
				grid[row][col] = 'B'
	for v in grid:
		ans += ''.join(v) + '\n'
	print(ans)

def solve2():
	N = int(input())
	grid = [['B'] * N for _ in range(N)]
	for row in range(N):
		for col in range(N):
			if (row + col) % 2 == 1:
				grid[row][col] = 'W'
	ans = ''
	for v in grid:
		ans += ''.join(v) + '\n'
	print(ans)
solve2()


n = int(input())
for i in range(n):
	if i % 2 == 0:
		new = ''
		for j in range(n):
			if j % 2 == 0:
				new = new + 'W'
			else:
				new = new + 'B'
	else:
		new = ''
		for j in range(n):
			if j % 2 == 0:
				new = new + 'B'
			else:
				new = new + 'W'
	print(new)


n = int(input())
flag = True
rozm = n // 2
r = n % 2
for i in range(n):
	str = ''
	if flag:
		str += 'WB' * rozm
		if r:
			str += 'W'
		flag = False
	else:
		str += 'BW' * rozm
		if r:
			str += 'B'
		flag = True
	print(str)


siz = int(input())
for i in range(siz):
	for j in range(siz):
		if i & 1 and j & 1:
			print('W', end='')
		elif i & 1 == 0 and j & 1 == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()


import sys
import math
from collections import defaultdict
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
n = int(input())
for i in range(n):
	if i % 2 == 0:
		for j in range(n):
			if j % 2 == 0:
				print('W', end='')
			else:
				print('B', end='')
	else:
		for j in range(n):
			if j % 2 == 0:
				print('B', end='')
			else:
				print('W', end='')
	print()


n = int(input())
for i in range(n):
	res = ''
	for j in range(n):
		if i + j & 1:
			res += 'W'
		else:
			res += 'B'
	print(res)


N = int(input())
S = [0] * N
BW = 'BW'
for i in range(N):
	for j in range(N):
		S[j] = BW[(i + j) % 2]
	print(*S, sep='')


import sys
input = lambda : sys.stdin.readline().strip()
n = int(input())
matrix = []
for i in range(n):
	matrix.append([])
	for i in range(n):
		matrix[-1].append('.')
for i in range(n):
	for j in range(n):
		if (j - i) % 2 == 0:
			matrix[i][j] = 'W'
		else:
			matrix[i][j] = 'B'
for i in range(n):
	for j in range(n):
		print(matrix[i][j], end='')
	print()


n = int(input())
l = []
for i in range(n):
	l.append([0 for j in range(n)])
for j in range(n):
	for k in range(n):
		if (j + k) % 2 == 0:
			l[j][k] = 'W'
		else:
			l[j][k] = 'B'
for i in range(len(l)):
	print(''.join(l[i]))


n = int(input())
mass = ['W', 'B']
s = ''
for i in range(n + 2):
	s += mass[i % 2]
for i in range(n):
	print(s[i % 2:n + i % 2])


n = int(input())
field = [['W'] * n for _ in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			field[i][j] = 'B'
for line in field:
	print(''.join([item for item in line]))


def swap(choice):
	if choice == 'W':
		return 'B'
	return 'W'
n = int(input())
choice = 'W'
ans = []
if n & 1:
	for i in range(n):
		row = ''
		for j in range(n):
			row += choice
			choice = swap(choice)
		ans.append(row)
else:
	for i in range(n):
		if not i & 1:
			choice = 'W'
		else:
			choice = 'B'
		row = ''
		for j in range(n):
			row += choice
			choice = swap(choice)
		ans.append(row)
for i in ans:
	print(i)


N = int(input())
grid = [['*'] * N for _ in range(N)]
grid[0][0] = 'W'
for i in range(N):
	for j in range(N):
		if grid[i][j] == '*':
			if j == 0:
				if grid[i - 1][j] == 'W':
					grid[i][j] = 'B'
				else:
					grid[i][j] = 'W'
			elif grid[i][j - 1] == 'W':
				grid[i][j] = 'B'
			else:
				grid[i][j] = 'W'
		if grid[i][j] == 'W':
			if 0 <= i - 2 < N and 0 <= j + 1 < N:
				if grid[i - 2][j + 1] == '*':
					grid[i - 2][j + 1] = 'B'
			if 0 <= i - 1 < N and 0 <= j + 2 < N:
				if grid[i - 1][j + 2] == '*':
					grid[i - 1][j + 2] = 'B'
			if 0 <= i + 1 < N and 0 <= j + 2 < N:
				if grid[i + 1][j + 2] == '*':
					grid[i + 1][j + 2] = 'B'
			if 0 <= i + 2 < N and 0 <= j + 1 < N:
				if grid[i + 2][j + 1] == '*':
					grid[i + 2][j + 1] = 'B'
			if 0 <= i + 2 < N and 0 <= j - 1 < N:
				if grid[i + 2][j - 1] == '*':
					grid[i + 2][j - 1] = 'B'
			if 0 <= i + 1 < N and 0 <= j - 2 < N:
				if grid[i + 1][j - 2] == '*':
					grid[i + 1][j - 2] = 'B'
			if 0 <= i - 1 < N and 0 <= j + 2 < N:
				if grid[i - 1][j + 2] == '*':
					grid[i - 1][j + 2] = 'B'
			if 0 <= i - 2 < N and 0 <= j - 1 < N:
				if grid[i - 2][j - 1] == '*':
					grid[i - 2][j - 1] = 'B'
		else:
			if 0 <= i - 2 < N and 0 <= j + 1 < N:
				if grid[i - 2][j + 1] == '*':
					grid[i - 2][j + 1] = 'W'
			if 0 <= i - 1 < N and 0 <= j + 2 < N:
				if grid[i - 1][j + 2] == '*':
					grid[i - 1][j + 2] = 'W'
			if 0 <= i + 1 < N and 0 <= j + 2 < N:
				if grid[i + 1][j + 2] == '*':
					grid[i + 1][j + 2] = 'W'
			if 0 <= i + 2 < N and 0 <= j + 1 < N:
				if grid[i + 2][j + 1] == '*':
					grid[i + 2][j + 1] = 'W'
			if 0 <= i + 2 < N and 0 <= j - 1 < N:
				if grid[i + 2][j - 1] == '*':
					grid[i + 2][j - 1] = 'W'
			if 0 <= i + 1 < N and 0 <= j - 2 < N:
				if grid[i + 1][j - 2] == '*':
					grid[i + 1][j - 2] = 'W'
			if 0 <= i - 1 < N and 0 <= j + 2 < N:
				if grid[i - 1][j + 2] == '*':
					grid[i - 1][j + 2] = 'W'
			if 0 <= i - 2 < N and 0 <= j - 1 < N:
				if grid[i - 2][j - 1] == '*':
					grid[i - 2][j - 1] = 'W'
for i in range(N):
	for j in range(N):
		print(grid[i][j], end='')
	print()


from collections import defaultdict as df
d = df(list)
n = int(input())
a = [[0] * n for i in range(n)]
y = 1
for i in range(n):
	if i == 0:
		pass
	elif a[i - 1][0] == 'W':
		y = 2
	else:
		y = 1
	for j in range(n):
		if y == 1:
			a[i][j] = 'W'
			y = 2
		else:
			a[i][j] = 'B'
			y = 1
for i in a:
	print(''.join(i))


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
from heapq import heappush as hpush
from heapq import heappop as hpop
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())
n = ri(1)
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()


n = int(input())
A = [[0 for i in range(n)] for j in range(n)]
for i in range(n):
	if i % 2 == 0:
		for j in range(n):
			if j % 2 == 0:
				A[i][j] = 'W'
			else:
				A[i][j] = 'B'
	else:
		for j in range(n):
			if j % 2 == 0:
				A[i][j] = 'B'
			else:
				A[i][j] = 'W'
for i in range(n):
	strr = ''
	for j in range(n):
		strr += A[i][j]
	print(strr)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()

def addDictList(d, key, val):
	if key not in d:
		d[key] = []
	d[key].append(val)

def addDictInt(d, key, val):
	if key not in d:
		d[key] = 0
	d[key] = val

def addDictCount(d, key):
	if key not in d:
		d[key] = 0
	d[key] += 1

def addDictSum(d, key, val):
	if key not in d:
		d[key] = 0
	d[key] += val
n = getInt()
for i in range(n):
	if i % 2 == 0:
		print('WB' * (n // 2) + 'W' * (n % 2))
	else:
		print('BW' * (n // 2) + 'B' * (n % 2))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
n = get_int()
a = 'W'
b = 'B'
row1 = ''
row2 = ''
turn = 0
for i in range(n):
	if turn:
		row1 += a
		row2 += b
		turn = 0
	else:
		row1 += b
		row2 += a
		turn = 1
turn = 0
for j in range(n):
	if turn:
		print(row1)
		turn = 0
	else:
		print(row2)
		turn = 1


import sys
input = sys.stdin.readline
n = int(input())
ANS = [['T'] * n for i in range(n)]
from collections import deque
ANS[0][0] = 'W'
WQUE = deque()
WQUE.append((0, 0))
BQUE = deque()
while WQUE or BQUE:
	while WQUE:
		(x, y) = WQUE.pop()
		for (u, v) in [(x + 2, y + 1), (x + 2, y - 1), (x - 2, y + 1), (x - 2, y - 1), (x + 1, y + 2), (x + 1, y - 2), (x - 1, y + 2), (x - 1, y - 2)]:
			if 0 <= u < n and 0 <= v < n and (ANS[u][v] == 'T'):
				ANS[u][v] = 'B'
				BQUE.append((u, v))
	while BQUE:
		(x, y) = BQUE.pop()
		for (u, v) in [(x + 2, y + 1), (x + 2, y - 1), (x - 2, y + 1), (x - 2, y - 1), (x + 1, y + 2), (x + 1, y - 2), (x - 1, y + 2), (x - 1, y - 2)]:
			if 0 <= u < n and 0 <= v < n and (ANS[u][v] == 'T'):
				ANS[u][v] = 'W'
				WQUE.append((u, v))
if n == 3:
	ANS[1][1] = 'W'
for ans in ANS:
	print(''.join(ans))


import math, sys
from collections import defaultdict, deque
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')

def I():
	return int(sys.stdin.readline())

def In():
	return map(int, sys.stdin.readline().split())

def Sn():
	return sys.stdin.readline().strip()

def Pr(x):
	sys.stdout.write(str(x) + '\n')

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		an1 = []
		for i in range(n):
			if i % 2 == 0:
				an1.append('W')
			else:
				an1.append('B')
		for i in range(n):
			for j in range(n):
				if i % 2 == 0:
					print(an1[j], end='')
				else:
					print('B', end='') if an1[j] == 'W' else print('W', end='')
			print()
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


n = int(input())
a = []
a.append(1)
a.append(2)
for i in range(n):
	a[i % 2] = 'W'
	a[(i + 1) % 2] = 'B'
	for j in range(n):
		print(a[j % 2], end='')
	print()


import sys
import math, bisect
sys.setrecursionlimit(10 ** 5)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
n = I()
a = 'BW' * (n // 2)
b = 'WB' * (n // 2)
if n % 2:
	a += 'B'
if n % 2:
	b += 'W'
Ans = []
for i in range(n):
	if i % 2:
		Ans += [b]
	else:
		Ans += [a]
for i in Ans:
	print(i)


def main():
	import sys
	input = sys.stdin.readline
	N = int(input())
	line1 = ['B' if i % 2 else 'W' for i in range(N)]
	line2 = ['W' if i % 2 else 'B' for i in range(N)]
	line1 = ''.join(line1)
	line2 = ''.join(line2)
	for i in range(N):
		if i % 2:
			print(line1)
		else:
			print(line2)
main()


n = int(input())
for i in range(n):
	s = []
	for j in range(n):
		if (i + j) % 2 == 0:
			s.append('W')
		else:
			s.append('B')
	print(''.join(map(str, s)))


n = int(input())
a = 'BW'
b = 'WB'
for i in range(n):
	if i % 2 == 0:
		if n % 2 == 0:
			print(a * (n // 2))
		else:
			print(a * (n // 2) + a[0])
	elif n % 2 == 0:
		print(b * (n // 2))
	else:
		print(b * (n // 2) + b[0])


n = int(input())
m = n
arr = [[0 for _ in range(m)] for _ in range(n)]
for i in range(n):
	for j in range(m):
		if (i + j) % 2 == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()


__author__ = 'Esfandiar'
n = int(input())
f = 0
a = 'WB'
b = 'BW'
for i in range(n):
	if f == 0:
		print((a * (n // 2 + 1))[:n])
	else:
		print((b * (n // 2 + 1))[:n])
	f ^= 1


n = int(input())
s = 'WB' * (n // 2) + 'W' * (n % 2)
s1 = 'BW' * (n // 2) + 'B' * (n % 2)
for i in range(n // 2):
	print(s)
	print(s1)
if n % 2 == 1:
	print(s)


n = int(input())
for i in range(n):
	if i % 2 == 0:
		print('WB' * (n // 2), end='')
		print('W' * (n % 2))
	else:
		print('BW' * (n // 2), end='')
		print('B' * (n % 2))


n = int(input())
i = 0
s = ''.join(['W' if (i + j) % 2 == 0 else 'B' for i in range(n) for j in range(n)])
while i < n * n:
	print(s[i:i + n])
	i += n


n = int(input())
colours = ['WB', 'BW']
cs = ['W', 'B']
ind = 0
should = n % 2
for i in range(n):
	rem = i % 2
	s = colours[rem] * (n // 2) + (cs[rem] if should else '')
	print(s)


from queue import Queue
n = int(input())
ans = [['.' for j in range(n)] for i in range(n)]
q = Queue(maxsize=n * n)
for i in range(n):
	for j in range(n):
		if ans[i][j] == '.':
			q.put(['W', i, j])
			ans[i][j] = 'W'
			while not q.empty():
				s = q.get()
				cord = [[s[1] + 2, s[2] + 1], [s[1] + 2, s[2] - 1], [s[1] - 2, s[2] + 1], [s[1] - 2, s[2] - 1], [s[1] + 1, s[2] + 2], [s[1] + 1, s[2] - 2], [s[1] - 1, s[2] + 2], [s[1] - 1, s[2] - 2]]
				for cor in cord:
					if -1 < cor[0] < n and -1 < cor[1] < n and (ans[cor[0]][cor[1]] == '.'):
						ans[cor[0]][cor[1]] = 'W' if s[0] == 'B' else 'B'
						q.put([ans[cor[0]][cor[1]], cor[0], cor[1]])
for i in ans:
	print(''.join(i))


def gns():
	return list(map(int, input().split()))
t = int(input())
for i in range(t):
	if i % 2 == 0:
		s = 'WB' * (t // 2) + 'W' * (t % 2)
	else:
		s = 'BW' * (t // 2) + 'B' * (t % 2)
	print(s)


x = [2, 1, -2, -1]
y = [2, 1, -2, -1]
p = []
for k in x:
	for l in y:
		if abs(k) != abs(l):
			p.append([k, l])
for _ in range(1):
	n = int(input())
	a = [[0 for i in range(n)] for j in range(n)]
	for i in range(n):
		for j in range(n):
			if a[i][j] == 0:
				a[i][j] = 1
				s = [(i, j)]
				while s:
					pp = s.pop(0)
					(ii, jj) = pp
					for k in p:
						if ii + k[0] < n and ii + k[0] >= 0 and (jj + k[1] < n) and (jj + k[1] >= 0) and (a[ii + k[0]][jj + k[1]] == 0):
							a[ii + k[0]][jj + k[1]] = 3 - a[ii][jj]
							s.append((ii + k[0], jj + k[1]))
	for i in range(n):
		for j in range(n):
			if a[i][j] == 1:
				print('B', end='')
			else:
				print('W', end='')
		print()


n = int(input())
ss = 'BW' * (n // 2) + 'B' * (n % 2)
tt = 'WB' * (n // 2) + 'W' * (n % 2)
for i in range(n):
	if i & 1:
		print(ss)
	else:
		print(tt)


import os
import sys
from io import BytesIO, IOBase

def solution(n):
	pos1 = ['W' if i & 1 == 0 else 'B' for i in range(n)]
	pos2 = ['B' if i & 1 == 0 else 'W' for i in range(n)]
	for i in range(n):
		if i & 1 == 0:
			print(''.join(pos1))
		else:
			print(''.join(pos2))

def main():
	n = r_int()
	solution(n)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


n = int(input())
board = [['.' for _ in range(n)] for _ in range(n)]
delta = [(-2, -1), (-2, 1), (-1, 2), (1, 2), (2, 1), (2, -1), (1, -2), (-1, -2)]
q = [(0, 0)]
board[0][0] = 'W'
while len(q):
	(y, x) = q[0]
	del q[0]
	c = 'B' if board[y][x] == 'W' else 'W'
	for (dy, dx) in delta:
		(yy, xx) = (y + dy, x + dx)
		if 0 <= yy < n and 0 <= xx < n and (board[yy][xx] == '.'):
			board[yy][xx] = c
			q.append((yy, xx))
for row in board:
	print(''.join(row).replace('.', 'W'))


n = int(input())
(first, second) = ('', '')
for i in range(n):
	first += 'W' if i % 2 == 0 else 'B'
	second += 'B' if i % 2 == 0 else 'W'
for i in range(n):
	print(first if i % 2 == 0 else second)


def main():
	n = int(input())
	is_odd = n % 2 == 1
	line1 = 'WB' * (n // 2)
	line2 = 'BW' * (n // 2)
	if is_odd:
		line1 = line1 + 'W'
		line2 = line2 + 'B'
	for _ in range(n // 2):
		print(line1)
		print(line2)
	if is_odd:
		print(line1)
main()


from sys import *
from typing import *
from collections import *
from string import *
from itertools import *
from math import *
import json
from fractions import *
from typing import *
from collections import *
from bisect import *
from random import *
cin_buffer = []
cin_buffer_ptr = 0

def next() -> str:
	global cin_buffer
	global cin_buffer_ptr
	if cin_buffer_ptr >= len(cin_buffer):
		cin_buffer = input().split()
		cin_buffer_ptr = 0
		return next()
	else:
		res = cin_buffer[cin_buffer_ptr]
		cin_buffer_ptr += 1
		return res

def next_int() -> int:
	return int(next())
setrecursionlimit(10 ** 6)
n = next_int()
dx = [1, 1, -1, -1, 2, 2, -2, -2]
dy = [2, -2, 2, -2, 1, -1, 1, -1]
board = {}

def bfs(i, j, color):
	board[i, j] = color
	queue = Deque([(i, j, color)])
	while queue:
		(i, j, color) = queue.popleft()
		for k in range(8):
			ii = i + dx[k]
			jj = j + dy[k]
			if 0 <= ii < n and 0 <= jj < n and ((ii, jj) not in board):
				new_color = 'B' if color == 'W' else 'W'
				board[ii, jj] = new_color
				queue.append((ii, jj, new_color))
for i in range(n):
	for j in range(n):
		if (i, j) not in board:
			bfs(i, j, 'W')
for i in range(n):
	print(''.join((board[i, j] for j in range(n))))


dx = [1, 1, -1, -1, 2, 2, -2, -2]
dy = [2, -2, 2, -2, 1, -1, 1, -1]
n = int(input())
arr = [['c' for i in range(n)] for j in range(n)]
for i in range(n):
	for j in range(n):
		if j != 0 and arr[i][j - 1] == 'W':
			arr[i][j] = 'B'
		elif i == 0 and j == 0:
			arr[i][j] = 'W'
		elif j == 0 and arr[i - 1][j] == 'W':
			arr[i][j] = 'B'
		else:
			arr[i][j] = 'W'
for i in range(n):
	for j in range(n):
		print(arr[i][j], end='')
	print()


import sys
input = sys.stdin.readline
n = int(input())
s = ['WB' * (n // 2) + 'W' * (n % 2), 'BW' * (n // 2) + 'B' * (n % 2)]
for i in range(n):
	print(s[i % 2])


n = int(input())
for i in range(n):
	now = i % 2
	for j in range(n):
		print('B' if now == 0 else 'W', end='')
		now ^= 1
	print()


from math import *
t = int(input())
for y in range(t):
	for z in range(t):
		if (y + z) % 2 == 0:
			ch = 'B'
		else:
			ch = 'W'
		print(ch, end='')
	print()


def value():
	return int(input())

def li():
	return [int(_______) for _______ in input().split()]
from collections import *
n = value()
s = ''
(a, b) = ('W', 'B')
(a, b) = (b, a)
for j in range(n):
	(a, b) = (b, a)
	for i in range(n):
		if i & 1:
			s += b
		else:
			s += a
	print(s)
	s = ''


import sys
input = sys.stdin.readline
t = 1
for _ in range(t):
	n = int(input())
	ans = [[None for i in range(n)] for j in range(n)]
	curr = 'W'
	for i in range(n):
		ans[i][0] = curr
		if curr == 'W':
			curr = 'B'
		else:
			curr = 'W'
	for i in range(n):
		for j in range(1, n):
			if ans[i][j - 1] == 'W':
				ans[i][j] = 'B'
			else:
				ans[i][j] = 'W'
	for i in range(n):
		for j in range(n):
			print(ans[i][j], end='')
		print()


n = int(input())
c = ['W', 'B']
for i in range(n):
	tmp = []
	for j in range(n):
		tmp.append(c[(i + j) % 2])
	print(''.join(list(map(str, tmp))))


import sys
from collections import defaultdict
from itertools import combinations
from itertools import permutations
input = lambda : sys.stdin.readline().rstrip()

def write(*args, sep=' '):
	for i in args:
		sys.stdout.write('{}'.format(i) + sep)
INF = float('inf')
MOD = int(1000000000.0 + 7)
n = int(input())
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			write('W', sep='')
		else:
			write('B', sep='')
	print()


import math, sys
from collections import Counter, defaultdict
from sys import stdin, stdout
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
n = int(input())
for i in range(0, n):
	for j in range(0, n):
		if j % 2 == i % 2:
			print('W', end='')
		else:
			print('B', end='')
	print()


from typing import List, Any, Union
try:
	from string_source import string_source
	source = string_source('3')
except ImportError:
	source = input

def duels(n):
	grid: List[List[str]] = [[None] * n for _ in range(n)]
	jumps = [s for (k, v) in [(2, 1), (2, -1), (-2, 1), (-2, -1)] for s in [(k, v), (v, k)]]
	grid[0][0] = 'W'
	seen = {(0, 0)}
	stack = [(0, 0)]
	if n == 3:
		grid[1][1] = 'W'
	while stack:
		(x, y) = stack.pop()
		if grid[x][y] == 'W':
			color = 'B'
		else:
			color = 'W'
		for (jx, jy) in jumps:
			(x1, y1) = (x + jx, y + jy)
			if not (0 <= x1 < n and 0 <= y1 < n) or (x1, y1) in seen:
				continue
			grid[x1][y1] = color
			seen.add((x1, y1))
			stack.append((x1, y1))
	return '\n'.join((''.join(g) for g in grid))
print(duels(int(source())))


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	n = int(input())
	for i in range(n):
		if i % 2 == 0:
			for j in range(n // 2):
				print('WB', end='')
			if n % 2 != 0:
				print('W', end='')
			print()
		else:
			for j in range(n // 2):
				print('BW', end='')
			if n % 2 != 0:
				print('B', end='')
			print()
t = 1
for _ in range(t):
	solve()


def printLines(n):
	for line in range(n):
		for letter in range(n):
			print('W', end='') if (line + letter) % 2 == 0 else print('B', end='')
		print()
number = int(input())
printLines(number)


n = int(input())
ans = []
se = ['W', 'B']
for i in range(n):
	for j in range(n):
		print('W' if (i + j) % 2 == 0 else 'B', end='')
	print('')


a = int(input())
if a % 2 == 0:
	for i in range(int(a / 2)):
		print('WB' * int(a / 2))
		print('BW' * int(a / 2))
else:
	for i in range(int((a - 1) / 2)):
		print('WB' * int((a - 1) / 2) + 'W')
		print('BW' * int((a - 1) / 2) + 'B')
	print('WB' * int((a - 1) / 2) + 'W')


n = int(input())
ans = [['WB'[(i + j) % 2] for j in range(n)] for i in range(n)]
for i in range(n):
	print(''.join(ans[i]))


n = int(input())
arr = [[0 for i in range(n)] for i in range(n)]
w = 'W'
b = 'B'
l = n * n
stack = []
row = [-2, -2, 2, 2, 1, 1, -1, -1]
col = [-1, 1, 1, -1, -2, 2, 2, -2]
stack.append((0, 0, w))
l -= 1
while len(stack) != 0:
	curr = stack.pop()
	r1 = curr[0]
	c1 = curr[1]
	colo = curr[2]
	for i in range(8):
		r = r1 + row[i]
		c = c1 + col[i]
		if r >= 0 and r < n and (c >= 0) and (c < n) and (arr[r][c] == 0):
			if colo == w:
				stack.append((r, c, b))
				arr[r][c] = b
			else:
				stack.append((r, c, w))
				arr[r][c] = w

def solve(i, j):
	count1 = 0
	(r, c) = (0, 0)
	for i in range(8):
		r = i + row[i]
		c = j + col[i]
		if r >= 0 and r < n and (c >= 0) and (c < n) and (arr[r][c] == b):
			count1 += 1
	count2 = 0
	(r, c) = (0, 0)
	for i in range(8):
		r = i + row[i]
		c = j + col[i]
		if r >= 0 and r < n and (c >= 0) and (c < n) and (arr[r][c] == w):
			count2 += 1
	if count1 >= count2:
		return 'W'
	return 'B'
for i in range(n):
	for j in range(n):
		if arr[i][j] == 0:
			print('B', end='')
		else:
			print(arr[i][j], end='')
	print()


import sys
import math

def solve(n: int):
	for i in range(n):
		line = ''
		for j in range(n):
			if (i + j) % 2 == 0:
				line += 'W'
			else:
				line += 'B'
		print(line)
	return
n = int(input())
solve(n)
pass


x = int(input())
for i in range(x):
	s = ''
	if i % 2 == 0:
		for j in range(x):
			if j % 2 == 0:
				s = s + 'B'
			else:
				s = s + 'W'
	if i % 2 != 0:
		for j in range(x):
			if j % 2 == 0:
				s = s + 'W'
			else:
				s = s + 'B'
	print(s)


n = int(input())
for i in range(n):
	s = i % 2
	for j in range(n):
		c = (s + j) % 2
		if c == 1:
			print('W', end='')
		else:
			print('B', end='')
	print()


n = int(input())
s = 'WB' * (n // 2 + 1)
l = [s[:n], s[1:n + 1]] * (n // 2 + 1)
print('\n'.join(l[:n]))


n = int(input())
d = {0: 'W', 1: 'B'}
for i in range(n):
	for j in range(n):
		print(d[(i + j) % 2], end='')
	print()


from queue import *
n = int(input())
field = [[-1] * n for i in range(n)]
field[0][0] = 0
qu = Queue()
qu.put([0, 0])
while not qu.empty():
	(i, j) = qu.get()
	val = 1 - field[i][j]
	i2 = i + 1
	j2 = j + 2
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i + 1
	j2 = j - 2
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i - 1
	j2 = j + 2
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i - 1
	j2 = j - 2
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i + 2
	j2 = j + 1
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i + 2
	j2 = j - 1
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i - 2
	j2 = j + 1
	if i2 > -1 and j2 > -1 and (i2 < n) and (j2 < n) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
	i2 = i - 2
	j2 = j - 1
	if i2 < n and j2 < n and (i2 > -1) and (j2 > -1) and (field[i2][j2] == -1):
		qu.put([i2, j2])
		field[i2][j2] = val
for i in range(n):
	for j in range(n):
		if field[i][j] == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()


def main():
	answer = ''
	n = int(input())
	start = 'WB'
	swap = dict()
	swap['W'] = 'B'
	swap['B'] = 'W'
	if n % 2 == 0:
		first_row = start * (n // 2)
	else:
		first_row = start * (n // 2) + 'W'
	for i in range(n):
		answer += first_row + '\n'
		if n % 2 == 1:
			first_row = first_row[1:] + swap[first_row[0]]
		else:
			first_row = first_row[1:] + first_row[0]
	print(answer)
main()


n = int(input())
L = ['W', 'B']
for i in range(n):
	for j in range(n):
		print(L[(i + j) % 2], end='')
	print()


n = int(input())
grid = [[0] * n for _ in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 0:
			grid[i][j] = 'W'
		else:
			grid[i][j] = 'B'
for item in grid:
	print(*item, sep='')


n = int(input())
for i in range(1, n + 1):
	if i & 1:
		s = ''
		for j in range(1, n + 1):
			if j & 1:
				s = s + 'W'
			else:
				s = s + 'B'
	else:
		s = ''
		for k in range(1, n + 1):
			if k & 1:
				s = s + 'B'
			else:
				s = s + 'W'
	print(s)


n = int(input())
s = 'WB'
for i in range(n):
	for j in range(n):
		print(s[(i + j) % 2], end='')
	print()


read = lambda : [int(i) for i in input().split()]
n = int(input())
s = ''.join(['W' if i % 2 else 'B' for i in range(n + 1)])
for i in range(n):
	print(s[:n] if i % 2 else s[1:])


import atexit
import io
import sys
_I_B = sys.stdin.read().splitlines()
input = iter(_I_B).__next__
_O_B = io.StringIO()
sys.stdout = _O_B

@atexit.register
def write():
	sys.__stdout__.write(_O_B.getvalue())

def main():
	n = int(input())
	s = ['WB' * (n // 2), 'BW' * (n // 2)]
	if n & 1:
		s[0] += 'W'
		s[1] += 'B'
	for i in range(n):
		print(s[i & 1])
main()


def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
B = [['.'] * n for _ in range(n)]
B[0][0] = 'W'
for i in range(1, n):
	B[0][i] = 'W' if B[0][i - 1] == 'B' else 'B'
for i in range(1, n):
	for j in range(n):
		B[i][j] = 'W' if B[i - 1][j] == 'B' else 'B'
print('\n'.join((''.join(row) for row in B)))


n = int(input())
sr = 1
for i in range(n):
	for j in range(n):
		if j % 2 == sr:
			print('W', end='')
		else:
			print('B', end='')
	print()
	sr = not sr


t = int(input())
arr = ['W', 'B']
a = 0
b = 0
for i in range(0, t):
	s = ''
	b = a
	for j in range(0, t):
		s += arr[b]
		b = (b + 1) % 2
	print(s)
	a = (a + 1) % 2


I = input
size = int(I())
board = [[] for i in range(size)]
for i in range(1, size + 1):
	for j in range(1, size + 1):
		if (i + j) % 2 == 1:
			print('B', end='')
		else:
			print('W', end='')
	print('')


n = int(input())
x = ['B'] * (n + 1)
for i in range(0, n + 1, 2):
	x[i] = 'W'
(x, y) = (''.join(x[:n]), ''.join(x[1:]))
p = True
for i in range(n):
	if p:
		print(x)
		p = not p
	else:
		print(y)
		p = not p


n = int(input())
ans = ''
l = []
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if (i + j) % 2 == 0:
			print('W', end='')
			l.append('W')
		else:
			print('B', end='')
			l.append('B')
		if len(l) % n == 0:
			print('')


from collections import deque

def isPosition(i, j):
	global n
	if i >= 0 and j >= 0 and (n > i) and (n > j):
		return True
	return False

def print2d(a):
	for i in range(len(a)):
		print(''.join(a[i]))
n = int(input())
a = []
for i in range(n):
	a.append([-1] * n)
queue = deque()
queue.append([0, 0, 0])
while len(queue):
	(i, j, color) = queue.popleft()
	if a[i][j] != -1:
		continue
	a[i][j] = color
	newColor = (color + 1) % 2
	if isPosition(i + 1, j + 2) and a[i + 1][j + 2] == -1:
		queue.append([i + 1, j + 2, newColor])
	if isPosition(i + 1, j - 2) and a[i + 1][j - 2] == -1:
		queue.append([i + 1, j - 2, newColor])
	if isPosition(i + 2, j - 1) and a[i + 2][j - 1] == -1:
		queue.append([i + 2, j - 1, newColor])
	if isPosition(i + 2, j + 1) and a[i + 2][j + 1] == -1:
		queue.append([i + 2, j + 1, newColor])
	if isPosition(i - 1, j + 2) and a[i - 1][j + 2] == -1:
		queue.append([i - 1, j + 2, newColor])
	if isPosition(i - 1, j - 2) and a[i - 1][j - 2] == -1:
		queue.append([i - 1, j - 2, newColor])
	if isPosition(i - 2, j + 1) and a[i - 2][j + 1] == -1:
		queue.append([i - 2, j + 1, newColor])
	if isPosition(i - 2, j - 1) and a[i - 2][j - 1] == -1:
		queue.append([i - 2, j - 1, newColor])
for i in range(len(a)):
	for j in range(len(a[i])):
		if a[i][j] == 0:
			a[i][j] = 'W'
		else:
			a[i][j] = 'B'
print2d(a)


n = int(input())
ans = [['' for i in range(n)] for j in range(n)]
if n % 2 != 0:
	check = True
	chw = 'W'
	chb = 'B'
	for i in range(n):
		for j in range(n):
			if check:
				ans[i][j] = chw
			else:
				ans[i][j] = chb
			check = not check
else:
	chw = 'W'
	chb = 'B'
	check = True
	for i in range(n):
		for j in range(n):
			if check:
				ans[i][j] = chw
			else:
				ans[i][j] = chb
			check = not check
		if j == n - 1:
			(chw, chb) = (chb, chw)
for i in range(n):
	print(''.join(ans[i]))


N = int(input())
l1 = ''.join(['W' if i % 2 == 0 else 'B' for i in range(N)])
l2 = ''.join(['B' if i % 2 == 0 else 'W' for i in range(N)])
for j in range(N):
	if j % 2 == 0:
		print(l1)
	else:
		print(l2)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		r = [['W'] * n for _ in range(n)]
		for i in range(n):
			for j in range(n):
				if (i + j) % 2 == 1:
					r[i][j] = 'B'
		rr.append(JAA(r, '\n', ''))
	return JA(rr, '\n')
print(main())


elem = int(input())
temp = 'W'
curr = 'W'
for x in range(elem):
	temp = curr
	for y in range(elem):
		print(temp, end='')
		if temp == 'W':
			temp = 'B'
		else:
			temp = 'W'
	if curr == 'W':
		curr = 'B'
	else:
		curr = 'W'
	print()


n = int(input())
tab = [['' for i in range(0, n)] for i in range(0, n)]

def neighbors(x, y):
	vect = [(1, 2), (2, 1), (2, -1), (1, -2), (-1, -2), (-2, -1), (-2, 1), (-1, 2)]
	pos = [(x + i, y + j) for (i, j) in vect]
	return [(i, j) for (i, j) in pos if i >= 0 and j >= 0 and (i < n) and (j < n)]

def check(is_black, pos):
	s = [(is_black, pos)]
	while s != []:
		(is_black, (x, y)) = s.pop()
		if tab[x][y] == '':
			if is_black:
				tab[x][y] = 'B'
			else:
				tab[x][y] = 'W'
			for pos in neighbors(x, y):
				s.append((not is_black, pos))
for i in range(0, n):
	for j in range(0, n):
		if tab[i][j] == '':
			check(False, (i, j))
		print(tab[i][j], end='')
	print()


a = int(input())
for i in range(a):
	if i % 2 == 0:
		count = 0
		for j in range(a):
			if count == 0:
				print('W', end='')
				count = 1
			else:
				print('B', end='')
				count = 0
	else:
		count = 1
		for j in range(a):
			if count == 0:
				print('W', end='')
				count = 1
			else:
				print('B', end='')
				count = 0
	print()


n = int(input())
oe = 1
ans = ''
for i in range(n):
	for j in range(n):
		ans = ans + 'W' if oe % 2 else ans + 'B'
		oe += 1
	ans += '\n'
	oe = 1 if i % 2 else 0
print(ans)


a = int(input())
u = []
for i in range(a):
	b = ''
	for j in range(a):
		if (j + i) % 2 == 0:
			b += 'W'
		else:
			b += 'B'
	u.append(b)
for i in range(a):
	print(u[i])


n = int(input())
w = 0
for i in range(n):
	q = 0
	for j in range(n):
		print('W', end='')
		q = q + 1
		if q == n - 1:
			print('B')
			q = 0
			break
		print('B', end='')
		q = q + 1
		if q == n - 1:
			print('W')
			q = 0
			break
	w = w + 1
	if w == n:
		w = 0
		break
	q = 0
	for j in range(n):
		print('B', end='')
		q = q + 1
		if q == n - 1:
			print('W')
			q = 0
			break
		print('W', end='')
		q = q + 1
		if q == n - 1:
			print('B')
			q = 0
			break
	w = w + 1
	if w == n:
		w = 0
		break


n = int(input())
s = []
if n % 2 == 0:
	for i in range(n):
		if i % 2 == 0:
			s.append('BW' * (n // 2))
		else:
			s.append('WB' * (n // 2))
	for i in s:
		print(i)
else:
	for i in range(n):
		if i % 2 == 0:
			a = 'BW' * -(-n // 2)
			a = a.replace('B', '', 1)
			s.append(a)
		else:
			a = 'WB' * -(-n // 2)
			a = a.replace('W', '', 1)
			s.append(a)
	for i in s:
		print(i)


a = int(input())
for i in range(0, a):
	if i % 2 == 0:
		for i in range(0, a):
			if i % 2 == 0:
				print('W', end='')
			else:
				print('B', end='')
	else:
		for i in range(0, a):
			if i % 2 == 0:
				print('B', end='')
			else:
				print('W', end='')
	print()


a = int(input())
str1 = ''
str2 = ''
i = 0
while i < a:
	if i % 2 == 0:
		str1 += 'B'
		str2 += 'W'
	else:
		str1 += 'W'
		str2 += 'B'
	i += 1
for m in range(a):
	if m % 2 == 0:
		print(str1)
	else:
		print(str2)


n = int(input(''))
board = []
knight = 'W'
for i in range(1, pow(n, 2) + 1):
	board.append(knight)
	if i % n == 0 and n % 2 == 0:
		continue
	elif knight == 'W':
		knight = 'B'
	else:
		knight = 'W'
for i in range(len(board)):
	print(board[i], end='')
	if (i + 1) % n == 0:
		print('')


N = int(input())
if N % 2 == 1:
	k = (N - 1) // 2
	for i in range(k):
		print('WB' * k + 'W')
		print('BW' * k + 'B')
	print('WB' * k + 'W')
if N % 2 == 0:
	k = N // 2
	for i in range(k):
		print('WB' * k)
		print('BW' * k)


s = 'WB'
n = int(input())
(main, left) = (n // 2, n % 2)
for i in range(n):
	print(s * main + left * s[0]) if i % 2 == 0 else print(s[::-1] * main + left * s[::-1][0])


from fractions import gcd
from datetime import date
from heapq import *
import math
from collections import defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
inf = float('inf')

def main():
	n = int(input())
	b = ['' for j in range(n)]
	for i in range(n):
		for j in range(n):
			if (i + j) % 2 == 0:
				b[i] += 'W'
			else:
				b[i] += 'B'
	for i in range(n):
		print(b[i])
main()


from collections import deque
n = int(input())
moves = [(1, 2), (1, -2), (-1, 2), (-1, -2), (2, 1), (-2, 1), (2, -1), (-2, -1)]
board = [[None] * n for _ in range(n)]

def bfs(x, y):
	board[x][y] = 'W'
	q = deque()
	q.append((x, y))
	while q:
		(x, y) = q.popleft()
		for (dx, dy) in moves:
			if 0 <= x + dx < n and 0 <= y + dy < n and (not board[x + dx][y + dy]):
				if board[x][y] == 'W':
					board[x + dx][y + dy] = 'B'
				else:
					board[x + dx][y + dy] = 'W'
				q.append((x + dx, y + dy))
for x in range(n):
	for y in range(n):
		if not board[x][y]:
			bfs(x, y)
for x in range(n):
	print(''.join(board[x]))


n = int(input())
a = [list('W' * n) for i in range(n)]
for i in range(n):
	for j in range(n):
		if (i + j) % 2:
			a[i][j] = 'B'
for i in a:
	print(*i, sep='')


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
n = ii()
for i in range(n):
	for j in range(n):
		if (i + j) % 2 == 1:
			print('B', end='')
		else:
			print('W', end='')
	print()


n = int(input())
w = True
curr = w
for _ in range(n):
	for _ in range(n):
		print('W' if curr else 'B', end='')
		curr = not curr
	print()
	w = not w
	curr = w


n = int(input())
black = True
for i in range(n):
	for j in range(n):
		if black:
			if j % 2 == 0:
				print('B', end='')
			else:
				print('W', end='')
		elif j % 2 == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()
	black = not black


n = int(input())
for i in range(n):
	line = ''
	for j in range(n):
		if (i + j) % 2 != 1:
			line += 'W'
		else:
			line += 'B'
	print(line)


from sys import stdin
input = stdin.readline
n = int(input())
s = 'WB' * (n // 2) + ['', 'W'][n & 1]
t = 'BW' * (n // 2) + ['', 'B'][n & 1]
for i in range(n):
	if i & 1:
		print(s)
	else:
		print(t)


import math
import os
import sys
DEBUG = 'DEBUG' in os.environ

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def main():
	N = int(inp())
	a = 'WB' * (N // 2) + ('W' if N % 2 == 1 else '')
	b = 'BW' * (N // 2) + ('B' if N % 2 == 1 else '')
	for i in range(N):
		if i % 2 == 0:
			print(a)
		else:
			print(b)
main()


from sys import stdin, stdout
N = int(stdin.readline())
ans = [['W' for i in range(N)] for i in range(N)]
for i in range(N):
	for j in range(N):
		if not i % 2 and (not j % 2) or (i % 2 and j % 2):
			ans[i][j] = 'B'
for i in range(N):
	print(''.join(ans[i]))


import collections
t = int(input())
ans = []
for i in range(0, t):
	a = ['a'] * t
	ans.append(a)
m = 'W'
for i in range(0, t):
	for j in range(0, t):
		ans[i][j] = m
		if m == 'W':
			m = 'B'
		else:
			m = 'W'
	if ans[i][0] == 'W':
		m = 'B'
	else:
		m = 'W'
for i in range(0, t):
	print(*ans[i], sep='')


n = int(input())
pattern1 = list('WB') * (n // 2)
pattern2 = list('BW') * (n // 2)
if n & 1:
	pattern1.append('W')
	pattern2.append('B')
for K in range(n):
	if K & 1:
		print(''.join(pattern2))
	else:
		print(''.join(pattern1))


import sys
n = int(input())
for i in range(n):
	for j in range(n):
		print('W' if (i + j) % 2 == 0 else 'B', sep='', end='')
	print()


n = int(input())
k = ['W', 'B']
(a1, b1) = (n // 2, n % 2)
for i in range(n):
	(a, b) = (i // 2, i % 2)
	print((k[b] + k[(b + 1) % 2]) * a1 + k[b] * b1)


def main():
	t = int(input())
	arr = [[0 for i in range(t)] for j in range(t)]
	for i in range(t):
		new = ''
		for j in range(t):
			if (i + j) % 2 == 0:
				new += 'B'
			else:
				new += 'W'
		print(new)
	return
main()


n = int(input())
print('\n'.join((''.join(('BW'[(r + c) % 2] for c in range(n))) for r in range(n))))


n = int(input())
star = 0
for i in range(n):
	s = ''
	for j in range(n // 2 + 1):
		s += 'WB'
	if star == 0:
		star = 1
		print(s[:n])
	else:
		star = 0
		print(s[1:n + 1])


def ans(n):
	for i in range(0, n):
		s = ''
		if i % 2 == 0:
			for j in range(0, n):
				if j % 2 == 0:
					s += 'W'
				else:
					s += 'B'
		else:
			for j in range(0, n):
				if j % 2 == 0:
					s += 'B'
				else:
					s += 'W'
		print(s)
n = int(input())
ans(n)


n = int(input())
f = ''.join(('W' if i % 2 else 'B' for i in range(n)))
g = ''.join(('B' if i % 2 else 'W' for i in range(n)))
for i in range(n):
	if i % 2:
		print(f)
	else:
		print(g)


n = int(input())
d = {'W': 'B', 'B': 'W'}
s1 = ''
s2 = ''
i = 'W'
for j in range(n):
	s1 += i
	s2 += d[i]
	i = d[i]
d[s1] = s2
d[s2] = s1
j = s1
for i in range(n):
	print(j)
	j = d[j]


n = int(input())
for i in range(n):
	if i % 2 == 0:
		fl = 0
	else:
		fl = 1
	for j in range(n):
		if j % 2 == 0 and fl == 0:
			print('W', end='')
		elif j % 2 == 0 and fl == 1:
			print('B', end='')
		elif fl == 0:
			print('B', end='')
		else:
			print('W', end='')
	print()


from sys import stdout
print = stdout.write
n = int(input())
for i in range(n):
	for j in range(n):
		if i % 2 == 0:
			if j % 2 == 0:
				print('B')
			else:
				print('W')
		elif j % 2 == 0:
			print('W')
		else:
			print('B')
	print('\n')


def read():
	return int(input())
n = read()
switch = True
a = []
for i in range(n):
	line = [None] * n
	for j in range(n):
		line[j] = 'W' if (i + j) % 2 == 0 else 'B'
	a.append(line)
for line in a:
	print(''.join(line))


n = int(input())
field = []
for i in range(n):
	field.append([''] * n)
	for j in range(n):
		if i % 2 == 0:
			field[i][j] = 'W' if j % 2 == 0 else 'B'
		else:
			field[i][j] = 'B' if j % 2 == 0 else 'W'
for i in range(n):
	print(''.join(field[i]))


t = int(input())
l = []
n = []
for j in range(t):
	if j % 2 == 0:
		l.append('W')
	else:
		l.append('B')
for j in range(t):
	if j % 2 != 0:
		n.append('W')
	else:
		n.append('B')
for j in range(1, t + 1):
	if j % 2 == 0:
		print(''.join(l))
	else:
		print(''.join(n))


n = int(input())
s = 'WB' * (n // 2)
if n % 2 != 0:
	s = s + s[0]
s1 = 'BW' * (n // 2)
if n % 2 != 0:
	s1 = s1 + s1[0]
for i in range(n):
	if i % 2 == 0:
		print(s)
	else:
		print(s1)


a = int(input())
mo = [[0 for x in range(a)] for y in range(a)]
for x in range(a):
	for y in range(a):
		if (x + y) % 2 == 0:
			mo[x][y] = 'W'
		else:
			mo[x][y] = 'B'
for x in range(len(mo)):
	for y in range(len(mo)):
		print(mo[x][y], end='')
	print()


def horses(n):
	lst = list()
	for i in range(n):
		s = ''
		if i % 2 == 0:
			for j in range(n):
				if j % 2 == 0:
					s += 'W'
				else:
					s += 'B'
		else:
			for j in range(n):
				if j % 2 == 0:
					s += 'B'
				else:
					s += 'W'
		lst.append(s)
	return lst
for elem in horses(int(input())):
	print(elem)


n = int(input())
grid = [[]] * n
li = ['a'] * n
for i in range(0, n, 2):
	li[i] = 'B'
for i in range(1, n, 2):
	li[i] = 'W'
for i in range(0, n, 2):
	grid[i] = li
li = ['a'] * n
for i in range(0, n, 2):
	li[i] = 'W'
for i in range(1, n, 2):
	li[i] = 'B'
for i in range(1, n, 2):
	grid[i] = li
for i in grid:
	print(''.join(i))


n = int(input())
q = ['W', 'B'] * (n // 2)
qw = []
if n % 2 != 0:
	q.append('W')
w = ['B', 'W'] * (n // 2)
if n % 2 != 0:
	w.append('B')
for i in range(n // 2):
	print(''.join(q))
	print(''.join(w))
if n % 2 != 0:
	print(''.join(q))


n = int(input())
arr = [[0 for i in range(n)] for j in range(n)]
(a, b) = (1, 2)
flag = 0
for i in range(n):
	flag += 1
	for j in range(n):
		if flag % 2 == 0:
			if j % 2 == 0:
				arr[i][j] = 1
			else:
				arr[i][j] = 2
		elif j % 2 == 0:
			arr[i][j] = 2
		else:
			arr[i][j] = 1
for i in range(n):
	for j in range(n):
		if arr[i][j] == 1:
			print('B', end='')
		else:
			print('W', end='')
	if i < n - 1:
		print()


def op(b):
	if b == 1:
		return 0
	else:
		return 1

def fill(a, i, j, n):
	pluses = [[1, 2], [1, -2], [2, 1], [2, -1]]
	for plus in pluses:
		ii = i + plus[0]
		jj = j + plus[1]
		if ii < n and jj < n and (ii > -1) and (jj > -1):
			if a[ii][jj] == 9:
				a[ii][jj] = op(a[i][j])

def last(a, i, j, n):
	if i == 0 and j == 0:
		return 1
	if j == 0:
		return a[i - 1][0]
	return a[i][j - 1]

def transfer(x):
	l = len(x)
	result = ''
	for i in range(l):
		if x[i] == 0:
			result += 'W'
		else:
			result += 'B'
	return result
n = int(input())
a = []
for i in range(n):
	a.append([])
	for j in range(n):
		a[i].append(9)
for i in range(n):
	for j in range(n):
		if a[i][j] == 9:
			a[i][j] = op(last(a, i, j, n))
		fill(a, i, j, n)
for i in range(n):
	print(transfer(a[i]))


n = int(input())
mat = list(list())
for j in range(n):
	s = str()
	t = str()
	for i in range(n):
		if j % 2 == 0:
			if i % 2 == 0:
				s = s + 'W'
			else:
				s = s + 'B'
		elif i % 2 == 0:
			t = t + 'B'
		else:
			t = t + 'W'
	if s != '':
		print(s)
	if t != '':
		print(t)


import collections
n = int(input())
for i in range(n):
	print('BW' * (n // 2) + 'B' * (n % 2) if i % 2 else 'WB' * (n // 2) + 'W' * (n % 2))


def draw(n):
	a = ''
	b = ''
	for i in range(n):
		if i % 2 == 0:
			a += 'W'
			b += 'B'
		else:
			a += 'B'
			b += 'W'
	return (a, b)
n = int(input())
(a, b) = draw(n)
for i in range(n):
	if i % 2 == 0:
		print(a)
	else:
		print(b)


n = int(input())
arr = [['W'] * n for i in range(n)]
for i in range(n):
	for j in range(i % 2, n, 2):
		arr[i][j] = 'B'
for item in arr:
	tot = ''
	for i in item:
		tot += i
	print(tot)


n = int(input())
from collections import deque
visit = [[-1] * n for _ in range(n)]
for i in range(n):
	for j in range(n):
		if visit[i][j] == -1:
			visit[i][j] = 0
			q = deque([])
			q.append((i, j))
			while q:
				(y, x) = q.popleft()
				for (dy, dx) in ((2, 1), (2, -1), (-2, 1), (-2, -1), (1, 2), (1, -2), (-1, 2), (-1, -2)):
					(ny, nx) = (y + dy, x + dx)
					if 0 <= ny < n and 0 <= nx < n:
						if visit[ny][nx] == -1:
							visit[ny][nx] = 1 - visit[y][x]
							q.append((ny, nx))
for i in range(n):
	for j in range(n):
		if visit[i][j] == 1:
			visit[i][j] = 'B'
		else:
			visit[i][j] = 'W'
for i in range(n):
	print(''.join(visit[i]))


import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub
sys.setrecursionlimit(100000)
input = sys.stdin.readline

def read_int():
	return int(input())

def read_int_n():
	return list(map(int, input().split()))

def read_float():
	return float(input())

def read_float_n():
	return list(map(float, input().split()))

def read_str():
	return input().strip()

def read_str_n():
	return list(map(str, input().split()))

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

@mt
def slv(N):
	B = [[None] * N for _ in range(N)]
	for i in range(N):
		for j in range(N):
			if i % 2 == 0 and j % 2 == 0:
				B[i][j] = 'W'
			elif i % 2 == 1 and j % 2 == 1:
				B[i][j] = 'W'
			else:
				B[i][j] = 'B'
	for r in B:
		print(''.join(r))

def main():
	N = read_int()
	slv(N)
main()


from collections import defaultdict as DD
from bisect import bisect_left as BL
from bisect import bisect_right as BR
from itertools import combinations as IC
from itertools import permutations as IP
from random import randint as RI
import sys
MOD = pow(10, 9) + 7

def IN(f=0):
	if f == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())
n = IN(1)
p1 = 'WB' * (n // 2) + 'W' * (n % 2)
p2 = 'BW' * (n // 2) + 'B' * (n % 2)
a = []
for i in range(n // 2):
	a.append(p1)
	a.append(p2)
for i in range(n % 2):
	a.append(p1)
for i in a:
	print(i)


n = int(input())
a = list()
flag2 = False
for i in range(n):
	nowlist = list()
	flag = flag2
	flag2 = flag2 != 1
	for j in range(n):
		if flag == False:
			nowlist.append('W')
		else:
			nowlist.append('B')
		flag = flag != 1
	a.append(nowlist)
for i in range(n):
	for j in range(n):
		print(a[i][j], end='')
	print()


n = int(input())
a = 'BW' * n
for i in range(n):
	print(a[i % 2:i % 2 + n])


n = int(input())
t = ['WB', 'BW']
for i in range(n):
	print(t[i & 1] * (n // 2) + t[i & 1][:n % 2])


from itertools import cycle
n = int(input())
for i in range(n):
	if i % 2 == 0:
		print(''.join((i for (_, i) in zip(range(n), cycle('WB')))))
	else:
		print(''.join((i for (_, i) in zip(range(n), cycle('BW')))))


n = int(input())
print_w = True
odd = n % 2 == 1
for i in range(n):
	for j in range(n):
		if print_w:
			print('W', end='')
		else:
			print('B', end='')
		print_w = not print_w
	if not odd:
		print_w = not print_w
	print()


import sys
import math
import functools
from collections import deque
sin = sys.stdin
n = int(sin.readline())
first = 'W'
char = 'W'
for i in range(n):
	if first == 'W':
		first = 'B'
	else:
		first = 'W'
	char = first
	for j in range(n):
		print(char, end='')
		if char == 'W':
			char = 'B'
		else:
			char = 'W'
	print('')


n = int(input())
out1 = ''
out2 = ''
for i in range(n):
	if i % 2 == 0:
		out1 += 'W'
		out2 += 'B'
	else:
		out1 += 'B'
		out2 += 'W'
for i in range(n):
	if i % 2 == 0:
		print(out1)
	else:
		print(out2)


n = int(input())
r1 = ''
r2 = ''
for i in range(n):
	if i % 2 == 0:
		r1 += 'W'
		r2 += 'B'
	else:
		r1 += 'B'
		r2 += 'W'
for i in range(n):
	if i % 2 == 0:
		print(r1)
	else:
		print(r2)


def main():
	n = int(input())
	for i in range(n):
		if i % 2 == 0:
			start = 'W'
			end = 'B'
		else:
			start = 'B'
			end = 'W'
		for j in range(n):
			if j % 2 == 0:
				print(start, end='')
			else:
				print(end, end='')
		print()
main()


n = int(input())
a = 'WB' * (n // 2)
b = 'BW' * (n // 2)
if n & 1:
	a += 'W'
	b += 'B'
for i in range(n):
	print(a if i & 1 else b)


n = int(input())
l = []
k = ''
for i in range(n):
	if i % 2 == 0:
		k += 'W'
	else:
		k += 'B'
l.append(k)
for i in range(1, n):
	k = ''
	if i - 2 > -1:
		a = i - 2
	elif i - 1 > -1:
		a = i - 1
	for j in range(n):
		b = -1
		if a == i - 1:
			if j + 2 < n:
				b = j + 2
			elif j - 2 > -1:
				b = j - 2
			else:
				b = j - 1
		elif a == i - 2:
			if j + 1 < n:
				b = j + 1
			elif j - 1 > -1:
				b = j - 1
		if a == i - 1 and b == -1:
			k += 'B'
		elif l[a][b] == 'B':
			k += 'W'
		else:
			k += 'B'
	l.append(k)
for i in range(n):
	print(l[i])


import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def revn(n):
	m = 0
	while n > 0:
		m = m * 10 + n % 10
		n = n // 10
	return m
n = ii()
for i in range(n):
	if i % 2 == 0:
		print('WB' * (n // 2) + 'W' * (n % 2))
	else:
		print('BW' * (n // 2) + 'B' * (n % 2))


n = int(input())
st = ''
for i in range(0, n):
	st = ''
	for j in range(0, n):
		st += ['W', 'B'][(j + i) % 2]
	print(st)


n = int(input())
shit1 = 'W'
shit2 = 'B'
for i in range(n - 1):
	if shit1[-1] == 'W':
		shit1 += 'B'
		shit2 += 'W'
	else:
		shit1 += 'W'
		shit2 += 'B'
for i in range(n):
	if i % 2 == 1:
		print(shit1)
	else:
		print(shit2)


n = int(input())
out = []
for i in range(0, n):
	kq = []
	for j in range(0, n):
		if j % 2 == 1 and i % 2 == 1:
			kq.append('B')
		elif j % 2 == 0 and i % 2 == 1:
			kq.append('W')
		if j % 2 == 1 and i % 2 == 0:
			kq.append('W')
		elif j % 2 == 0 and i % 2 == 0:
			kq.append('B')
	kq = ''.join(kq)
	out.append(kq)
for i in range(0, n):
	print(out[i])


n = int(input())
a = [[0 for i in range(n)] for i in range(n)]
a[0][0] = 'W'
di = [2, -2, -1, 1, 2, -2, -1, 1]
dj = [-1, 1, 2, -2, 1, -1, -2, 2]
for i in range(n):
	for j in range(n):
		c = ' '
		if a[i][j] == 'W':
			c = 'B'
		elif a[i][j] == 'B':
			c = 'W'
		else:
			cntb = 0
			cntw = 0
			for k in range(8):
				if 0 <= di[k] + i < n and 0 <= dj[k] + j < n:
					if a[di[k] + i][dj[k] + j] == 'W':
						cntw += 1
					elif a[di[k] + i][dj[k] + j] == 'B':
						cntb += 1
			if cntb > cntw:
				a[i][j] = 'W'
				c = 'B'
			else:
				a[i][j] = 'B'
				c = 'W'
		for k in range(8):
			if 0 <= di[k] + i < n and 0 <= dj[k] + j < n:
				a[di[k] + i][dj[k] + j] = c
for i in range(n):
	for j in range(n):
		print(a[i][j], end='')
	print()


import sys
import itertools
import math
import collections
from collections import Counter

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
t = ii()
a = 'BW' * cdiv(t, 2)
b = 'WB' * cdiv(t, 2)
for i in range(t // 2):
	print(a[:t])
	print(b[:t])
if t % 2:
	print(a[:t])


n = int(input())
for i in range(n):
	x = []
	for j in range(n):
		if i + j & 1:
			x.append('B')
		else:
			x.append('W')
	print(*x, sep='')


n = int(input())
if n % 2 == 0:
	e = 'WB' * (n // 2)
	o = 'BW' * (n // 2)
else:
	e = 'WB' * (n // 2) + 'W'
	o = 'BW' * (n // 2) + 'B'
for i in range(n):
	if i % 2 == 0:
		print(e)
	else:
		print(o)


import sys
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right
import math
n = int(input())
l = [['a' for j in range(n)] for i in range(n)]
for i in range(n):
	if i % 2 == 0:
		for j in range(n):
			if j % 2 == 0:
				l[i][j] = 'W'
			else:
				l[i][j] = 'B'
	else:
		for j in range(n):
			if j % 2 == 0:
				l[i][j] = 'B'
			else:
				l[i][j] = 'W'
for i in range(n):
	print(''.join(l[i]))


import math
side = int(input())
for i in range(side):
	for j in range(side):
		print('W' if math.pow(-1, i + j) == 1 else 'B', end='')
	print()


import sys

def main():
	n = int(sys.stdin.readline())
	for i in range(1, n + 1):
		if i % 2 == 1:
			p = 'W'
			for _ in range(n):
				print(p, end='')
				p = 'B' if p == 'W' else 'W'
		else:
			p = 'B'
			for _ in range(n):
				print(p, end='')
				p = 'B' if p == 'W' else 'W'
		print()
main()


t = int(input())
s = 'WB' * ((t + 3) // 2)
for i in range(t):
	if i % 2 == 0:
		print(s[:t])
	else:
		print(s[1:t + 1])


n = int(input())
q = ''
v = ''
for i in range(0, n, 2):
	q = q + 'WB'
	v = v + 'BW'
q = q[:n]
v = v[:n]
for i in range(0, n):
	if i % 2 == 0:
		print(q)
	else:
		print(v)


def valid(r, c, n, seen):
	return 0 <= r < n and 0 <= c < n and (not seen[r][c])
moves = [(2, 1), (2, -1), (-2, 1), (-2, -1), (1, 2), (-1, 2), (1, -2), (-1, -2)]

def bfs(n):
	ret = [[-1 for _ in range(n)] for _ in range(n)]
	seen = [[False for _ in range(n)] for _ in range(n)]
	(sym, cnt) = (['W', 'B'], 0)
	q = [(0, 0)]
	seen[0][0] = True
	ret[0][0] = 0
	while q:
		(r, c) = q.pop(0)
		for move in moves:
			(nr, nc) = (r + move[0], c + move[1])
			if valid(nr, nc, n, seen):
				ret[nr][nc] = 1 - ret[r][c]
				seen[nr][nc] = True
				q.append((nr, nc))
	for i in range(n):
		for j in range(n):
			ret[i][j] = sym[ret[i][j]]
	return ret

def main():
	n = int(input())
	ret = bfs(n)
	for row in ret:
		print(''.join(row))
main()


def line(i, j):
	x = ''
	if i == 1:
		for a in range(j):
			if a % 2 == 0:
				x = x + 'W'
			else:
				x = x + 'B'
	elif i == 0:
		for a in range(j):
			if a % 2 == 0:
				x = x + 'B'
			else:
				x = x + 'W'
	return x
n = int(input())
for m in range(n):
	if m % 2 == 0:
		print(line(1, n))
	else:
		print(line(0, n))


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2, floor, log
from bisect import bisect_right, bisect_left, bisect
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)
MOD = 1000000007
PMOD = 998244353
N = 10 ** 18 + 1
LOGN = 30
alp = 'abcdefghijklmnopqrstuvwxyz'
T = 1
for _ in range(T):
	n = int(stdin.readline())
	a = [['o' for j in range(n)] for i in range(n)]
	for i in range(n):
		for j in range(n):
			if (i + j) % 2 == 0:
				a[i][j] = 'W'
			else:
				a[i][j] = 'B'
	for i in range(n):
		for j in range(n):
			print(a[i][j], end='')
		print()


j = int(input())
print(*((j // 2 + 1) * [('WB' * (j // 2 + 1))[:j], ('BW' * (j // 2 + 1))[:j]])[:j], sep='\n')


n = int(input())
ret = [[None for _ in range(n)] for _ in range(n)]

def descendant(pos):
	(r, c) = pos
	p = [(r + 2, c + 1), (r - 2, c + 1), (r + 2, c - 1), (r - 2, c - 1), (r + 1, c + 2), (r + 1, c - 2), (r - 1, c + 2), (r - 1, c - 2)]
	return [(i, j) for (i, j) in p if 0 <= i < n and 0 <= j < n]
ret[0][0] = 'W'
q = [(0, 0)]
visited = set()
visited.add((0, 0))
while q:
	cur = q.pop(0)
	for d in descendant(cur):
		if d not in visited:
			q.append(d)
			visited.add(d)
			ret[d[0]][d[1]] = 'W' if ret[cur[0]][cur[1]] == 'B' else 'B'
for i in range(n):
	for j in range(n):
		if ret[i][j] == None:
			ret[i][j] = 'W'
for i in range(n):
	print(''.join(ret[i]))


n = int(input())
bFirst = 'BW' * (n // 2 + 1)
wFirst = 'WB' * (n // 2 + 1)
for i in range(n):
	if i % 2 == 0:
		print(bFirst[:n])
	else:
		print(wFirst[:n])


n = int(input())
s = 0
a = []
b = []
for i in range(n):
	s = 1 - s
	if s == 0:
		a.append('W')
		b.append('B')
	else:
		a.append('B')
		b.append('W')
a1 = ''.join(a)
b1 = ''.join(b)
s1 = 0
for i in range(n):
	s1 = 1 - s1
	if s1 == 0:
		print(a1)
	else:
		print(b1)


def check(a, b):
	if 0 <= a < n and 0 <= b < n:
		return True
	return False

def place(n):
	from collections import defaultdict
	grid = [[0 for _ in range(n)] for x in range(n)]
	vis = defaultdict(int)
	vis[0, 0] = 1
	grid[0][0] = 'W'
	q = [[0, 0, True]]
	while q:
		(a, b, c) = q.pop()
		if c:
			if check(a + 2, b + 1) and (a + 2, b + 1) not in vis:
				vis[a + 2, b + 1] = 1
				grid[a + 2][b + 1] = 'B'
				q.append([a + 2, b + 1, not c])
			if check(a + 2, b - 1) and (a + 2, b - 1) not in vis:
				vis[a + 2, b - 1] = 1
				grid[a + 2][b - 1] = 'B'
				q.append([a + 2, b - 1, not c])
			if check(a - 2, b + 1) and (a - 2, b + 1) not in vis:
				vis[a - 2, b + 1] = 1
				grid[a - 2][b + 1] = 'B'
				q.append([a - 2, b + 1, not c])
			if check(a - 2, b - 1) and (a - 2, b - 1) not in vis:
				vis[a - 2, b - 1] = 1
				grid[a - 2][b - 1] = 'B'
				q.append([a - 2, b - 1, not c])
			if check(a + 1, b + 2) and (a + 1, b + 2) not in vis:
				vis[a + 1, b + 2] = 1
				grid[a + 1][b + 2] = 'B'
				q.append([a + 1, b + 2, not c])
			if check(a + 1, b - 2) and (a + 1, b - 2) not in vis:
				vis[a + 1, b - 2] = 1
				grid[a + 1][b - 2] = 'B'
				q.append([a + 1, b - 2, not c])
			if check(a - 1, b + 2) and (a - 1, b + 2) not in vis:
				vis[a - 1, b + 2] = 1
				grid[a - 1][b + 2] = 'B'
				q.append([a - 1, b + 2, not c])
			if check(a - 1, b - 2) and (a - 1, b - 2) not in vis:
				vis[a - 1, b - 2] = 1
				grid[a - 1][b - 2] = 'B'
				q.append([a - 1, b - 2, not c])
		else:
			if check(a + 2, b + 1) and (a + 2, b + 1) not in vis:
				vis[a + 2, b + 1] = 1
				grid[a + 2][b + 1] = 'W'
				q.append([a + 2, b + 1, not c])
			if check(a + 2, b - 1) and (a + 2, b - 1) not in vis:
				vis[a + 2, b - 1] = 1
				grid[a + 2][b - 1] = 'W'
				q.append([a + 2, b - 1, not c])
			if check(a - 2, b + 1) and (a - 2, b + 1) not in vis:
				vis[a - 2, b + 1] = 1
				grid[a - 2][b + 1] = 'W'
				q.append([a - 2, b + 1, not c])
			if check(a - 2, b - 1) and (a - 2, b - 1) not in vis:
				vis[a - 2, b - 1] = 1
				grid[a - 2][b - 1] = 'W'
				q.append([a - 2, b - 1, not c])
			if check(a + 1, b + 2) and (a + 1, b + 2) not in vis:
				vis[a + 1, b + 2] = 1
				grid[a + 1][b + 2] = 'W'
				q.append([a + 1, b + 2, not c])
			if check(a + 1, b - 2) and (a + 1, b - 2) not in vis:
				vis[a + 1, b - 2] = 1
				grid[a + 1][b - 2] = 'W'
				q.append([a + 1, b - 2, not c])
			if check(a - 1, b + 2) and (a - 1, b + 2) not in vis:
				vis[a - 1, b + 2] = 1
				grid[a - 1][b + 2] = 'W'
				q.append([a - 1, b + 2, not c])
			if check(a - 1, b - 2) and (a - 1, b - 2) not in vis:
				vis[a - 1, b - 2] = 1
				grid[a - 1][b - 2] = 'W'
				q.append([a - 1, b - 2, not c])
	for i in range(n):
		for j in range(n):
			if grid[i][j] == 0:
				grid[i][j] = 'W'
	return grid
n = int(input())
grid = place(n)
for i in range(n):
	s = ''
	for j in range(n):
		s = s + grid[i][j]
	print(s)


n = int(input())
arr1 = 'WB' * (n // 2)
if n % 2 != 0:
	arr1 += 'W'
arr2 = 'BW' * (n // 2)
if n % 2 != 0:
	arr2 += 'B'
flag = 0
for i in range(n):
	if flag == 0:
		print(arr1)
		flag = 1
	else:
		flag = 0
		print(arr2)


n = int(input())
s = 'BW' * 200
for _ in range(n):
	if _ % 2:
		print(s[1:n + 1])
	else:
		print(s[:n])


n = int(input())
for i in range(n):
	s = 'W'
	s1 = 'B'
	for j in range(n):
		if i % 2 == 0:
			print(s, end='')
			if s == 'W':
				s = 'B'
			else:
				s = 'W'
		else:
			print(s1, end='')
			if s1 == 'W':
				s1 = 'B'
			else:
				s1 = 'W'
	print()


n = int(input())
for i in range(n):
	ans = []
	for j in range(n):
		ans.append('W' if (i ^ j) & 1 else 'B')
	print(''.join(ans))


import sys

def main():

	def input():
		return sys.stdin.readline()[:-1]
	n = int(input())
	a = [[0 for k in range(n)] for l in range(n)]
	a[0][0] = 1
	Q = [[0, 0]]
	while len(Q) > 0:
		t = Q.pop()
		(x, y) = (t[0], t[1])
		if 0 <= x + 2 < n and 0 <= y + 1 < n:
			if a[x + 2][y + 1] == 0:
				a[x + 2][y + 1] = -a[x][y]
				Q.append([x + 2, y + 1])
		if 0 <= x + 2 < n and 0 <= y - 1 < n:
			if a[x + 2][y - 1] == 0:
				a[x + 2][y - 1] = -a[x][y]
				Q.append([x + 2, y - 1])
		if 0 <= x - 2 < n and 0 <= y + 1 < n:
			if a[x - 2][y + 1] == 0:
				a[x - 2][y + 1] = -a[x][y]
				Q.append([x - 2, y + 1])
		if 0 <= x - 2 < n and 0 <= y - 1 < n:
			if a[x - 2][y - 1] == 0:
				a[x - 2][y - 1] = -a[x][y]
				Q.append([x - 2, y - 1])
		if 0 <= x + 1 < n and 0 <= y + 2 < n:
			if a[x + 1][y + 2] == 0:
				a[x + 1][y + 2] = -a[x][y]
				Q.append([x + 1, y + 2])
		if 0 <= x + 1 < n and 0 <= y - 2 < n:
			if a[x + 1][y - 2] == 0:
				a[x + 1][y - 2] = -a[x][y]
				Q.append([x + 1, y - 2])
		if 0 <= x - 1 < n and 0 <= y + 2 < n:
			if a[x - 1][y + 2] == 0:
				a[x - 1][y + 2] = -a[x][y]
				Q.append([x - 1, y + 2])
		if 0 <= x - 1 < n and 0 <= y - 2 < n:
			if a[x - 1][y - 2] == 0:
				a[x - 1][y - 2] = -a[x][y]
				Q.append([x - 1, y - 2])
	ans = [['' for k in range(n)] for l in range(n)]
	for k in range(n):
		for l in range(n):
			if a[k][l] == 1:
				ans[k][l] = 'W'
			else:
				ans[k][l] = 'B'
	for k in range(n):
		print(''.join(ans[k]))
main()


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
n = int(input())
for i in range(n):
	if i & 1:
		line = 'WB' * (n >> 1) + 'W' * (n & 1)
	else:
		line = 'BW' * (n >> 1) + 'B' * (n & 1)
	print(line)


n = int(input())
for i in range(n):
	a = []
	for j in range(n):
		if (i + j) % 2 == 0:
			a.append('W')
		elif (i + j) % 2 != 0:
			a.append('B')
	print(''.join(a))


from sys import stdin
n = int(stdin.readline().strip())
if n % 2 != 0:
	t = True
	for i in range(n):
		ans = ''
		for j in range(n):
			if t:
				ans += 'W'
			else:
				ans += 'B'
			t = not t
		print(ans)
else:
	t = False
	for i in range(n):
		ans = ''
		t = not t
		for j in range(n):
			if t:
				ans += 'W'
			else:
				ans += 'B'
			t = not t
		print(ans)


import sys, os, re, datetime, copy
from collections import *
from bisect import *
from math import *

def mat(v, *dims):

	def dim(i):
		return [copy.copy(v) for _ in range(dims[-1])] if i == len(dims) - 1 else [dim(i + 1) for _ in range(dims[i])]
	return dim(0)
__cin__ = None

def cin():
	global __cin__
	if __cin__ is None:
		__cin__ = iter(input().split(' '))
	try:
		return next(__cin__)
	except StopIteration:
		__cin__ = iter(input().split(' '))
		return next(__cin__)

def iarr(T, n):
	return [T(cin()) for _ in range(n)]

def carr(n):
	return input()

def imat(T, n, m):
	return [iarr(T, m) for _ in range(n)]

def cmat(n, m):
	return [input() for _ in range(n)]
n = int(cin())
b = mat('B', n, n)
k = 0
for i in range(n):
	j = 0 if i % 2 == 0 else 1
	while j < n:
		b[i][j] = 'W'
		j += 2
for _r in b:
	for v in _r:
		sys.stdout.write(str(v) + '')
	print()


num = int(input())
even = 'WB' * (num // 2) + 'W' * (num % 2)
odd = 'BW' * (num // 2) + 'B' * (num % 2)
for i in range(num):
	if i % 2 == 0:
		print(even)
	else:
		print(odd)


from collections import *
from bisect import *
from math import *
from heapq import *
import sys
input = sys.stdin.readline
t = 1
while t:
	t -= 1
	n = int(input())
	s = 'B'
	for i in range(n):
		for j in range(n):
			if (i + j) % 2:
				print('B', end='')
			else:
				print('W', end='')
		print()


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def si():
	return input()

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	n = ii()
	l = [[0 for i in range(n)] for j in range(n)]
	for i in range(n):
		for j in range(n):
			if (i + j) % 2 == 0:
				l[i][j] = 'B'
			else:
				l[i][j] = 'W'
	for i in l:
		print(''.join(i))
t = 1
for _ in range(t):
	solve()


n = int(input())
s = ''.join(('W' if i % 2 else 'B' for i in range(n)))
t = ''.join(('B' if i % 2 else 'W' for i in range(n)))
for i in range(n):
	print(t if i % 2 else s)


n = int(input())
a = [['B' for i in range(n)] for j in range(n)]
for i in range(n):
	for j in range(i % 2, n, 2):
		a[i][j] = 'W'
	for m in range(n):
		print(a[i][m], end='')
	print()


def check_coords(y, x, n):
	return x >= 0 and y >= 0 and (x < n) and (y < n)
VECTORS = [(2, 1), (1, 2), (-2, 1), (1, -2), (2, -1), (-1, 2), (-2, -1), (-1, -2)]

def get_valid_moves(y, x, n):
	moves = list()
	for (dy, dx) in VECTORS:
		move = (y + dy, x + dx)
		if check_coords(*move, n):
			moves.append(move)
	return moves
EMPTY = None
WHITE = 'W'
BLACK = 'B'

def get_opponent(color):
	return WHITE if color == BLACK else BLACK

def main():
	n = int(input())
	board = [[EMPTY for _ in range(n)] for _ in range(n)]
	for y in range(n):
		for x in range(n):
			if board[y][x]:
				continue
			board[y][x] = WHITE
			stack = [(y, x)]
			while stack:
				(posy, posx) = stack.pop()
				color = board[posy][posx]
				moves = get_valid_moves(posy, posx, n)
				opponent = get_opponent(color)
				for (ny, nx) in moves:
					if not board[ny][nx]:
						board[ny][nx] = opponent
						stack.append((ny, nx))
	for row in board:
		print(''.join(row))
main()


n = int(input())
res = list()
s0 = 'WB' * int(n / 2 + 1)
s1 = 'BW' * int(n / 2 + 1)
s0 = s0[:n]
s1 = s1[:n]
j = 0
for i in range(n):
	res.append(s1 if i % 2 else s0)
for i in range(len(res)):
	print(res[i])


t = int(input())
chess = []
arr1 = ''
arr2 = ''
flag = 0
for i in range(t):
	if flag == 0:
		arr1 += 'W'
		arr2 += 'B'
		flag = 1
	else:
		arr1 += 'B'
		arr2 += 'W'
		flag = 0
flag = 0
for i in range(t):
	if flag == 0:
		print(arr1)
		flag = 1
	else:
		print(arr2)
		flag = 0


x = int(input())
l = 0
start = 'W'
for i in range(x):
	s = ''
	if start == 'W':
		l = 0
	else:
		l = 1
	for j in range(x):
		if l == 0:
			s = s + 'W'
			l = 1
		else:
			s = s + 'B'
			l = 0
	print(s)
	start = 'B' if start == 'W' else 'W'


import math
tc = 1
for _ in range(tc):
	n = int(input())
	s = 'WB' * n
	for i in range(n):
		if i % 2 == 0:
			print(s[:n])
		else:
			print(s[1:n + 1])


arr = ['W', 'B']
n = int(input())
for x in range(n):
	s = ''
	i = x % 2
	for y in range(n):
		s += arr[i]
		i ^= 1
	print(s)


n = int(input())
t = 0
a = [[0 for i in range(n)] for j in range(n)]
for i in range(n):
	c = i
	r = 0
	for j in range(i + 1):
		if t % 2 == 0:
			a[r][c] = 'W'
		else:
			a[r][c] = 'B'
		c -= 1
		r += 1
	t += 1
for i in range(1, n):
	c = n - 1
	r = i
	for j in range(n - i):
		if t % 2 == 0:
			a[r][c] = 'W'
		else:
			a[r][c] = 'B'
		c -= 1
		r += 1
	t += 1
for i in range(n):
	print(*a[i], sep='')


from sys import stdin, stdout
n = int(stdin.readline())
for i in range(1, n + 1):
	for j in range(1, n + 1):
		if i % 2 == 1:
			if j % 2 == 1:
				print('W', end='')
			else:
				print('B', end='')
		elif j % 2 == 0:
			print('W', end='')
		else:
			print('B', end='')
	print()


from sys import stdin, stdout
import heapq
import cProfile, math
from collections import Counter, defaultdict, deque
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
import sys
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
fac_warm_up = False
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7

class MergeFind:

	def __init__(self, n):
		self.parent = list(range(n))
		self.size = [1] * n
		self.num_sets = n
		self.lista = [[_] for _ in range(n)]

	def find(self, a):
		to_update = []
		while a != self.parent[a]:
			to_update.append(a)
			a = self.parent[a]
		for b in to_update:
			self.parent[b] = a
		return self.parent[a]

	def merge(self, a, b):
		a = self.find(a)
		b = self.find(b)
		if a == b:
			return
		if self.size[a] < self.size[b]:
			(a, b) = (b, a)
		self.num_sets -= 1
		self.parent[b] = a
		self.size[a] += self.size[b]
		self.lista[a] += self.lista[b]

	def set_size(self, a):
		return self.size[self.find(a)]

	def __len__(self):
		return self.num_sets

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def prime_factors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def all_factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def fibonacci_modP(n, MOD):
	if n < 2:
		return 1
	return (cached_fn(fibonacci_modP, (n + 1) // 2, MOD) * cached_fn(fibonacci_modP, n // 2, MOD) + cached_fn(fibonacci_modP, (n - 1) // 2, MOD) * cached_fn(fibonacci_modP, (n - 2) // 2, MOD)) % MOD

def factorial_modP_Wilson(n, p):
	if p <= n:
		return 0
	res = p - 1
	for i in range(n + 1, p):
		res = res * cached_fn(InverseEuler, i, p) % p
	return res

def binary(n, digits=20):
	b = bin(n)[2:]
	b = '0' * (digits - len(b)) + b
	return b

def is_prime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def generate_primes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	return prime
factorial_modP = []

def warm_up_fac(MOD):
	global factorial_modP, fac_warm_up
	if fac_warm_up:
		return
	factorial_modP = [1 for _ in range(fac_warm_up_size + 1)]
	for i in range(2, fac_warm_up_size):
		factorial_modP[i] = factorial_modP[i - 1] * i % MOD
	fac_warm_up = True

def InverseEuler(n, MOD):
	return pow(n, MOD - 2, MOD)

def nCr(n, r, MOD):
	global fac_warm_up, factorial_modP
	if not fac_warm_up:
		warm_up_fac(MOD)
		fac_warm_up = True
	return factorial_modP[n] * (pow(factorial_modP[r], MOD - 2, MOD) * pow(factorial_modP[n - r], MOD - 2, MOD) % MOD) % MOD

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def display_2D_list(li):
	for i in li:
		print(i)

def prefix_sum(li):
	sm = 0
	res = []
	for i in li:
		sm += i
		res.append(sm)
	return res

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def ncr(n, r):
	return math.factorial(n) / (math.factorial(n - r) * math.factorial(r))

def binary_search(i, li):
	fn = lambda x: li[x] - x // i
	x = -1
	b = len(li)
	while b >= 1:
		while b + x < len(li) and fn(b + x) > 0:
			x += b
		b = b // 2
	return x
TestCases = False
fac_warm_up_size = 10 ** 5 + 100
optimise_for_recursion = False

def main():
	n = get_int()
	b = 'W'
	for i in range(n):
		s = b
		for j in range(n):
			print(s, end='')
			s = 'B' if s == 'W' else 'W'
		print()
		b = 'B' if b == 'W' else 'W'
if TestCases:
	for i in range(get_int()):
		main()
else:
	main() if not optimise_for_recursion else threading.Thread(target=main).start()


from math import log
n = int(input())
for i in range(n):
	for j in range(n):
		print('W' if (i + j) % 2 else 'B', end='')
	print()


import math
t = 1

def fn():
	n = int(input())
	first = ['W' if i % 2 == 0 else 'B' for i in range(n)]
	second = ['W' if i % 2 == 1 else 'B' for i in range(n)]
	for i in range(0, n, 2):
		print(''.join(first))
		i += 1
		if i < n:
			print(''.join(second))
while t:
	t -= 1
	fn()


n = int(input())
m = n
str1 = ''
str2 = ''
while n > 1:
	str1 = str1 + 'WB'
	str2 = str2 + 'BW'
	n = n - 2
if n == 1:
	str1 = str1 + 'W'
	str2 = str2 + 'B'
for i in range(m):
	if i % 2 == 0:
		print(str1)
	else:
		print(str2)


n = int(input())
for i in range(n):
	print((('WB', 'BW')[i % 2] * n)[:n])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
checker = 0
ans = []
c0 = []
c1 = []
for s in range(n):
	if s % 2 == 0:
		c0.append('W')
		c1.append('B')
	else:
		c0.append('B')
		c1.append('W')
for s in range(n):
	if s % 2 == 0:
		ans.append(c0)
	else:
		ans.append(c1)
for s in range(n):
	print(''.join(ans[s]))


n = int(input())
h = ['W', 'B']
for i in range(n):
	e = []
	for j in range(n):
		e.append(h[(i + j) % 2])
	print(''.join(e))


N = int(input())
B = []
for i in range(N):
	R = ''
	for j in range(N):
		if i % 2 and j % 2 or (not i % 2 and (not j % 2)):
			R += 'W'
		else:
			R += 'B'
	B.append(R)
for b in B:
	print(b)


n = int(input())
odd = 'WB'
eve = 'BW'
if n % 2 == 1:
	odd = odd * (n // 2) + 'W'
	eve = eve * (n // 2) + 'B'
else:
	odd = odd * (n // 2)
	eve = eve * (n // 2)
for i in range(1, n + 1):
	if i % 2:
		print(odd)
	else:
		print(eve)


N = int(input())
S = [('BW' * N)[:N], ('WB' * N)[:N]]
for i in range(N):
	print(S[i % 2])