Input (grade 6): 1809 & ndash; King Gustav IV Adolf of Sweden abdicates after a coup d' état.
Output (grade 8): 1799 - Edward Smith-Stanley, 14th Earl of Derby, Prime Minister of the United Kingdom (d. 1869)