We are given a nxn partially solved square board and have to solve it according to the following rules:
- We need to fill numbers from 1-n^2 in the empty cells
- Numbers from 1-n^2 already on the board cannot be replaced
- Each number from 1-n^2 must appear exactly once in the solved board
- Every pair of consecutive numbers must appear adjacent to each other either horizontally, vertically or diagonally on the board