Input (grade 13): 1267 - King Afonso III of Portugal and King Alfonso X of Castile sign a treaty determining the southern border between Portugal and Spain as the Guadiana River, a border that remains to this day.
Output (grade 12): 1267 - King Afonso III of Portugal and King Alfonso X of Castile sign a treaty to agree that the Guadiana River is the southern border between Portugal and Spain.