Input (grade 13): Cookies appear to have their origins in 7th century Persia, shortly after the use of sugar became relatively common in the region.
Output (grade 8): Cookies were made at first in 7th century AD Persia, just after the use of sugar became common there.