gift1; Added the first working version of the problem. This one can be improved a lot - I just wrote it as fast as I can.