Question: Who was the grandfather of the only reigning Scottish Queen?
Context: This list of Danish consorts includes each queen consort (wife of a reigning king) and each prince consort (husband of a reigning queen).  Due to unions (personal and real), the queens of 1380–1814 were also queens of Norway, and the queens of 1389–1520 were also (though with interruptions) queens of Sweden. Women in Medieval Scotland includes all aspects of the lives and status of women between the departure of the Romans from Northern Britain in the fifth century to the introduction of the Renaissance and Reformation in the early sixteenth century.  Medieval Scotland was a patriarchal society, but how exactly patriarchy worked in practice is difficult to discern.  A large proportion of the women for whom biographical details survive were members of the royal houses of Scotland.  Some of these became important figures.  There was only one reigning Scottish Queen in this period, the uncrowned and short-lived Margaret, Maid of Norway (r. 1286–90). Agnes Keith, Countess of Moray (c. 1540 – 16 July 1588) was a Scottish noblewoman having been the eldest daughter of William Keith, 4th Earl Marischal and Margaret Keith.  She was the wife of James Stewart, 1st Earl of Moray, Regent of Scotland and the illegitimate half-brother of Mary, Queen of Scots, making her a sister-in-law of the Scottish queen.  As the wife of the regent, Agnes was the most powerful woman in Scotland from 1567 until her husband's assassination in 1570. Gruoch ingen Boite (  1020–1054 ) was a Scottish queen, the daughter of Boite mac Cináeda, son of Cináed III.  She is most famous for being the wife and queen of MacBethad mac Findlaích (Macbeth).  The dates of her life are not certainly known. Ndlovukati (literally, "She-Elephant", pl.  "tiNdlovukati") is the Swazi title for the female head of state of Swaziland and is roughly equivalent to a Queen Mother or Senior Queen in other countries.  The title is given preferentially to the mother of the reigning King (styled the "Ngwenyama", "Lion of Swaziland"), or to another female royal of high status if the King's mother has died.  Indlovukati rules alongside the Ngwenyama, and when there is no King, she rules as a Queen Regent.  The current Ndlovukati is Queen Ntombi Tfwala, the mother of Ngwenyama Mswati III and wife of Sobhuza II.  She has also been Queen Regent from 1983 until 1986 when Mswati became King.  The most notable Queen Regent was Ndlovukati Labotsibeni Mdluli who ruled Swaziland from 1899 until 1921 when she abdicated for Sobhuza II. Thomas Morgan of Llantarnam (or Bassaleg, a branch of the Morgan of Tredegar) (1546–1606), of the Welsh Morgan of Monmouthshire, was a confidant and spy for Mary, Queen of Scots, and was involved in the Babington plot to kill Queen Elizabeth I of England.  In his youth, Thomas, a staunch Catholic, worked as Secretary of the Archbishop of York until 1568, and then for Lord Shrewsbury who had Mary under his care at this time.  Morgan's Catholic leanings soon brought him into the confidence of the Scottish queen and Mary enlisted Morgan as her secretary and go-between for the period extending between 1569 -1572 which coincinded with a series of important conspiracies against Elizabeth.  Morgan was imprisoned for 3 years in the Tower of London before exiling himself to France. Sir Henry Hastings, 3rd Earl of Huntingdon, KG, KB (ca. 1535 – 14 December 1595) was an English Puritan nobleman.  Educated alongside the future Edward VI, he was briefly imprisoned by Mary I, and later considered by some as a potential successor to Elizabeth I.  He hotly opposed the scheme to marry Mary, Queen of Scots, to the Duke of Norfolk, and was entrusted by Elizabeth to see that the Scottish queen did not escape at the time of the threatened uprising in 1569.  He is served as President of the Council of the North from 1572 until his death in 1595. A queen regnant (plural: queens regnant) is a female monarch, equivalent in rank to a king, who reigns in her own right, in contrast to a queen consort, who is the wife of a reigning king, or a queen regent, who is the guardian of a child monarch reigning temporarily in their stead. Margaret, Maid of Norway (9 April 1283 – 26 September 1290) was a Norwegian princess who was recognised as Queen of Scots following the death of her grandfather, King Alexander III, in March 1286.  Her death in Orkney while travelling to Scotland sparked off the disputed succession which led to the Wars of Scottish Independence. Margaret Douglas, Countess of Lennox (8 October 1515 – 7 March 1578) was the daughter of the Scottish queen dowager Margaret Tudor and her second husband Archibald Douglas, 6th Earl of Angus.  In her youth she was high in the favour of her uncle, Henry VIII of England, but twice incurred the King's anger, first for her unauthorised engagement to Lord Thomas Howard, who died in the Tower of London in 1537 because of his misalliance with her, and again in 1540 for an affair with Thomas Howard's nephew Sir Charles Howard, the brother of Henry's wife Catherine Howard.  On 6 July 1544, she married Matthew Stewart, 4th Earl of Lennox, one of Scotland's leading noblemen.  Her son Henry Stuart, Lord Darnley, married Mary, Queen of Scots, and was the father of James VI and I.
Answer: King Alexander III