Code for trying to solve PackageProblem from CodeEval