scala example, that solve the nqueen problem