P90: n-queens problem. Solution from Odersky's book