Input (grade 12): The Atlantic provinces became the Kingdom of Portugal in 1139, and the eastern, inland part of the kingdom was joined to the Kingdom of Castile by 1230.
Output (grade 6): It was founded in 910 A.D.. The Atlantic provinces became the Kingdom of Portugal in 1139, and the eastern, inland part of the kingdom was joined to the Kingdom of Castile by 1230.