Add Cutting Recipe problem solution in python