What type of government replaced the monarchy?