The purpose of all constitutions is to establish rules that a government must follow. Constitutions serve as the fundamental law of a country, outlining the structure of the government, defining the rights and responsibilities of its citizens, and guiding the operation of the state. They set forth a system of checks and balances to ensure the separation and balance of powers among different branches of government. Constitutions can also establish federal authority over state governments in countries with a federal system of government. Additionally, listing the rights of citizens is another essential function of a constitution, guaranteeing certain fundamental rights and freedoms to individuals. Therefore, the correct answer is D - to establish rules that a government must follow.