Design a small game, such as Tic-Tac-Toe, with a customizable grid size.
Implement play_game(n, moves). n is an integer grid size, and moves is a list of [row, column] coordinates. Players alternate between X and O, with X moving first. Return X or O when that player completes a row, column, or diagonal, Invalid for an out-of-range or repeated move, Draw when an n > 1 board is full without an earlier winner, and In Progress otherwise. On a full n > 1 board, Draw takes precedence over a winning line created by the final move. A one-cell board returns X after its valid move.
Example: n = 3, moves = [[0,0],[1,0],[0,1],[1,1],[0,2]] returns X.
def play_game(n, moves):