Solve UVa 10029 - Edit Step Ladders.