Input (grade 13): For centuries, the islands came under the control of successive indigenous empires before being ceded to the Portuguese and subsequently to the British East India Company.
Output (grade 7): The islands were ruled by successive kingdoms and indigenous empires before Portuguese settlers took it. Then, it went to the British East India Company.