Input (grade 7): Ferdinand III, Holy Roman Emperor (1637 - 1657).
Output (grade 6): Leopold I, Holy Roman Emperor (1658 - 1705). Ferdinand II, Holy Roman Emperor (1620 - 1637).