Place n queens on an n×n chessboard so no two queens attack each other.
Queens attack horizontally, vertically, and diagonally.
For n=4, one solution:
. Q . .
. . . Q
Q . . .
. . Q .
Return all distinct solutions. Each solution is a board configuration.
Constraints: 1≤n≤9.