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$).

Difficulty: EASY

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, 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')


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)


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())
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())
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())
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())
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='')


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)


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))


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()


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()


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])


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()


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())
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))


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])


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]))


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


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()


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())
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('')


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])


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()


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 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())
for i in range(n):
	line = ''
	for j in range(n):
		if (i + j) % 2 != 1:
			line += 'W'
		else:
			line += 'B'
	print(line)


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)


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()


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]))


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())
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]))


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)


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())
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()


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()


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())
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 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())
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())
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):
	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()


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()


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)