sentence1: The tower house was built in the 9th and 10th centuries and was extended into a castle in the Middle Ages .
sentence2: The tower house , expanded in the 9th and 10th centuries , was built in the Middle Ages into a castle .