Complete gift1 problem