Code for problem "Spiral Matrix".