What was the purpose of the monroe doctrine?

Ato discourage european nations from establishing colonies in latin america
Bto establish the right of the united states to be an international policeman
Cto annex texas to the united states
Dto open trade in china to all nations