Input (grade 8): Notice the coefficients are the numbers in row two of Pascal's triangle: 1, 2, 1.
Output (grade 7): Notice the coefficients are the third row of Pascal's triangle: 1, 2, 1.