make a plan
initialize debug environment
variable initialization
calculate how many bought for each item
calculate how many present for each item
generate output without summary
calculate summary
implement all  functions
clean debug environment