Write a program to play Gomoku on a 19x19 board. The player that makes five-in-a-row
(horizontal, vertical or diagonal) wins. We adopt the free style version of the game ---meaning, five or more in a row is a win.
The board has a 19x19 grid. The columns are labeled A, B, …, T from left to right. The rows are labeled 1, 2, 3, …, 19 from bottom to top. Each intersecting position is labeled by the coordinate, that is the name of the column (a letter) followed by the name of the row (a number), e.g. K10, L9, etc.
You can use whatever programming language you like. The interface of the program is as follows (a GUI interface is welcome but is not required):
The program should be in an eternal loop, waiting for the input, which is the coordinate of your opponent's move; and giving an output of the coordinate of your move. The input for the first move is O0 (Letter O followed by zero) as a convention. The letters should not be case sensitive. If one player wins, the loop should terminate and output the winner. If there is a tie, the program should report the result being a tie.