Write a program that allows a game of 3 by 3 tic-tac-toe to be played by two users. When the game is finished, print out whether 'X' won, 'O' won, or it was a cat's game (a cat's game is a tie).
The 'X' and 'O' players should be asked in turn for the row and column of their next move. Assume that integer coordinates will be entered, but make sure that coordinates are valid. The 'O' player moves first.