1017. Staircases