Input (grade 4): From 1819 to 1839 it served as the state capital of Illinois.
Output (grade 4): It was the capital of Illinois from 1819 to 1839.