n-queens, queries with for