Working CutStock program for the last problem of the assignment