{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"![Incredible Chess](CDN_BASE_URL/ba3b695cc4e4890579d07c9b35989eaf?v\u003d1714551431)\n\nYou are given an **n x n** chess board. Only pawn is used in the \u0027Incredible Chess\u0027 and they can move forward or backward. In each column there are two pawns, one white and one black. White pawns are placed in the lower part of the board and the black pawns are placed in the upper part of the board.\n\nThe game is played by two players. Initially a board configuration is given. One player uses white pieces while the other uses black. In each move, a player can move a pawn of his piece, which can go forward or backward any positive integer steps, but it cannot jump over any piece. White gives the first move.\n\nThe game ends when there is no move for a player and he/she will lose the game. Now you are given the initial configuration of the board. You have to write a program to determine who will be the winner."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026#8804; 200)**, denoting the number of test cases.\n\nEach case starts with an integer **n (3 \u0026#8804; n \u0026#8804; 100)** denoting the dimension of the board. The next line will contain **n** integers, **W\u003csub\u003e0\u003c/sub\u003e, W\u003csub\u003e1\u003c/sub\u003e, ..., W\u003csub\u003en-1\u003c/sub\u003e** giving the position of the white pieces. The next line will also contain **n** integers, **B\u003csub\u003e0\u003c/sub\u003e, B\u003csub\u003e1\u003c/sub\u003e, ... B\u003csub\u003en-1\u003c/sub\u003e** giving the position of the black pieces. **W\u003csub\u003ei\u003c/sub\u003e** means the row position of the white piece of **i\u003csup\u003eth\u003c/sup\u003e** column. And **B\u003csub\u003ei\u003c/sub\u003e** means the row position of the black piece of **i\u003csup\u003eth\u003c/sup\u003e** column. You can assume that **(0 \u0026#8804; W\u003csub\u003ei\u003c/sub\u003e \u0026lt; B\u003csub\u003ei\u003c/sub\u003e \u0026lt; n)** for **(0 \u0026#8804; i \u0026lt; n)** and at least one move is remaining.\n"}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and `white wins` or `black wins` depending on the result."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n6\n1 3 2 2 0 1\n5 5 5 3 1 2\n7\n1 3 2 2 0 4 0\n3 4 4 3 1 5 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: black wins\nCase 2: white wins\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}