Fill the terms to complete the pattern