You are given a chess position as a list of pieces. For each side, White and Black, you are told which square every piece stands on. Draw that position as ASCII art in the format described below.
The board is 8×8. Ranks (rows) run 8, 7, …, 1 from top to bottom, and files (columns) run a, b, …, h from left to right. Treating file a as 1, b as 2, …, h as 8, the square at (file f, rank r) is light when f + r is odd and dark when it is even. Thus a1 is a dark square.
Each square is drawn as exactly three characters. A light square uses the fill character ., a dark square uses the fill character :. An empty square repeats its fill character three times (... or :::). An occupied square is drawn as fill + piece + fill (for example .r. or :Q:).
The piece letters are K (king), Q (queen), R (rook), B (bishop), N (knight), and P (pawn). White pieces are drawn in uppercase, Black pieces in lowercase.
A vertical bar | sits between cells and at both ends, so a rank row looks like |c1|c2|…|c8|. A border line +---+---+---+---+---+---+---+---+ sits above every rank row and at the very bottom (9 border lines, 8 rank rows). Rank 8 is drawn at the top and rank 1 at the bottom.
The input has two lines. The first line begins with White: followed by a comma-separated list of White's pieces. The second line begins with Black: and lists Black's pieces the same way.
Each piece is either an uppercase piece letter (K, Q, R, B, N) followed by its square (for example Ke1, Nb1), or a square alone with no letter, which denotes a pawn (for example a2). A square is a file letter (a–h) followed by a rank digit (1–8). In the input both White and Black write their piece letters in uppercase.
Draw the chess board for the given position in the format described above.