Alice and Bob play a game on a chessboard with R rows and C columns, so RC squares in total. Some of the squares are burned.
At the start of the game a king stands on one unburned square. Alice and Bob then move the king in turn.
A move takes the king to one of its 8 neighbouring squares and has to satisfy two conditions:
- the destination square is not burned;
- the king has never stood on the destination square before.
A player who cannot move loses the game. Alice moves first. Determine who wins when both players play optimally.