Question: what medieval Scottish castle was build during the same period as the chapel Dedicated to the Virgin Mary?
Related documents: [0]  [DOC] The Castle of Rattray was a medieval Scottish castle, with multiple variations on its structure over approximately six centuries. Originally built as a ""late 12th- or early 13th century defensive motte"" it provided protection for Starny Keppie harbour and Rattray village. Sometime between 1214 and 1233 it was upgraded by William Comyn, jure uxoris Earl of Buchan before being destroyed in the 1308 Harrying of Buchan. After Comyn's timber castle was burned down it was replaced by a stronger stone castle which was engulfed during a 1720 sand storm along with nearby Rattray village. After the storm, the castle was not dug out and remains covered to this day. The castle was described by W. Douglas Simpson as one of the nine castles of the Knuckle, referring to the rocky headland of north-east Aberdeenshire. [END] 
[1]  [DOC] St Mary's Chapel (known also as "the Chapel of the Blessed Virgin") is a late 12th/early 13th century chapel found in Rattray, Aberdeenshire, Scotland. It was built by William Comyn, jure uxoris Earl of Buchan during the same period as the Castle of Rattray and was ""private chapel for the castle"" and its residents. ""Dedicated to the Virgin Mary"" it was possibly constructed after the ""drowning of a"..." [unknown] ""son of Comyn in the well near by."" [END] 
Answer: 
The Castle of Rattray
The Castle of Rattray