Input (grade 9): The Jagiellon rulers of Lithuania and Poland (with dates of ruling in brackets) were: Ladislaus (Jogaila) (in Lithuania 1377 - 1401; in Poland 1386 - 1434).
Output (grade 9): The Jagiellon rulers of Poland - Lithuania (with dates of ruling in brackets) were: Ladislaus (Jogaila) (in Lithuania 1377 - 1401; in Poland 1386 - 1434).