Input (grade 8): The caliphate was ruled by the Fatimids, who established the Egyptian city of Cairo as their capital.
Output (grade 6): The Fatimids established the Egyptian city of Cairo as their capital.