Reduce failed on homework3.