Input (grade 10): He was assassinated by the Muslim Brotherhood while in office.
Output (grade 10): He was assassinated by the Muslim Brotherhood while he was Prime Minister.