Question: Gomoku, also called Five in a Row, is an abstract strategy board game. It is traditionally played with black and white stones on a 1919

Gomoku, also called Five in a Row, is an abstract strategy board game. It is traditionally played with black and white stones on a 1919 board.The winner is the first player to form an unbroken chain of five stones horizontally, vertically, or diagonally. Please write a program to determine if there is a winner or not.

Input

Input content 19 line, each line content 19 character and a new line

O represent white stone, X represent black stone and _ means there is no stone on that spot.

output

Output "White" if white win, "Black" if black win, "No winner" if no one win.

Gomoku, also called Five in a Row, is an abstract strategy board

Sample Input 1 ) Sample Output 1 White 0_0 XX_O XOXX _XXOXX_X_ XOOXXXXOX O_XXOOOXo OXOOXOO 0_0 O_X 0 Sample Input 1 ) Sample Output 1 White 0_0 XX_O XOXX _XXOXX_X_ XOOXXXXOX O_XXOOOXo OXOOXOO 0_0 O_X 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!