DWITE Online Computer Programming Contest, January 2008, Problem 2
This one is a part of a classic game -- given a 3x3 board, check if
O, or neither has won (winner being the one having 3 of their symbols in a row, column, or diagonal).
The input will contain 5 sets, 3 lines each. Each line has 3 characters, out of
O, or period
The output will have 5 lines, a single character (
O, or period (
.)) -- the winner of the game.
Note: you could assume that there is only one winner on each board.
XO. .XO O.X ... .X. ... XXO OOX XOO OOO ... ... O.. O.. O..
X . . O O