Placing queens on a chessboard