On the Shelf Puzzle