What was the doctrine called that allowed the three branches of government to check the powers of each other