Implement a solution for tic tac toe checking problem, but the solution only works for a 3x3 board and is not applicable for nxn board.