Input (grade 13): The County of Portugal separated to become the independent Kingdom of Portugal in 1139 and the eastern, inland part of León was joined to the Kingdom of Castile in 1230.
Output (grade 6): It was founded in 910 A.D./O. 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.