Input (grade 9): His grandfather Boutros Ghali had been Prime Minister of Egypt from 1908 until he was assassinated in 1910.
Output (grade 7): He had served as Egypts Minister of State for Foreign Affairs from 1977 until early 1991.