Added the solution for the staves problem