Input (grade 12): In the 18th century, the Spanish government moved the city to its present place, away from the river, and brought families from the Canary Islands to live there.
Output (grade 12): In the century XVIII, the Spanish government moved the city to its present place, away from the river, and brought families from the Canary Islands to live there.