Input (grade 13): The remaining Spanish colonies of Cuba and Puerto Rico were occupied by the United States following the Spanish-American War (1898), ending Spanish rule in the Americas.
Output (grade 11): The remaining Spanish colonies, Cuba and Puerto Rico, were lost in 1898 as a consequence of the Spanish-American War.