Solution to UVa 10583 Chest of Drawers