Question: Sophia of England was the daughter of which Queen of Scotland, England, and Ireland?
Context: Saint Margaret of Scotland (c. 1045 – 16 November 1093), also known as Margaret of Wessex, was an English princess of the House of Wessex.  Margaret was sometimes called "The Pearl of Scotland".  Born in exile in the Kingdom of Hungary, she was the sister of Edgar Ætheling, the shortly reigned and uncrowned Anglo-Saxon King of England.  Margaret and her family returned to the Kingdom of England in 1057, but fled to the Kingdom of Scotland following the Norman conquest of England in 1066.  In 1070 Margaret married King Malcolm III of Scotland, becoming Queen of Scots.  She was a very pious Roman Catholic, and among many charitable works she established a ferry across the Firth of Forth in Scotland for pilgrims travelling to St Andrews in Fife, which gave the towns of South Queensferry and North Queensferry their names.  Margaret was the mother of three kings of Scotland, or four, if Edmund of Scotland, who ruled with his uncle, Donald III, is counted, and of a queen consort of England.  According to the "Vita S. Margaritae (Scotorum) Reginae" ("Life of St. Margaret, Queen (of the Scots)"), attributed to Turgot of Durham, she died at Edinburgh Castle in Edinburgh, Scotland in 1093, merely days after receiving the news of her husband's death in battle.  In 1250 Pope Innocent IV canonized her, and her remains were reinterred in a shrine in Dunfermline Abbey in Fife, Scotland.  Her relics were dispersed after the Scottish Reformation and subsequently lost.  Mary, Queen of Scots at one time owned her head, which was subsequently preserved by Jesuits in the Scottish College, Douai, France, from where it was subsequently lost during the French Revolution. The Rough Wooing (December 1543 – March 1551) was a war between Scotland and England.  Following its break with Rome, England decided to attack Scotland, partly to destroy the Auld Alliance, and prevent Scotland being used as a springboard for future invasion by France, partly to weaken Scotland, and partly to force Scotland to agree to a marriage alliance between its child Queen Mary and the English heir apparent Edward, son of King Henry VIII.  An invasion of France was also contemplated.  War was declared by Henry in an attempt to force the Scots to agree to a marriage between Edward and the infant queen, thereby creating a new alliance between Scotland and England.  Edward, crowned king in 1547 at the age of nine, continued the war for a time under the direction of the Duke of Somerset before Somerset's removal from power in 1549 and replacement by the Duke of Northumberland, who wished for a less costly foreign policy than his predecessor.  It was the last major conflict between Scotland and England before the Union of the Crowns in 1603, excepting perhaps the English intervention at the Siege of Leith in 1560, and was part of the Anglo-Scottish Wars of the 16th century. A monarchical system of government existed in Ireland from ancient times until, for what became the Republic of Ireland, the mid-twentieth century.  Northern Ireland, as part of the United Kingdom, remains under a monarchical system of government.  The Gaelic kingdoms of Ireland ended with the Norman invasion of Ireland, when the kingdom became a fief of the Holy See under the Lordship of the King of England.  This lasted until the Parliament of Ireland conferred the crown of Ireland upon King Henry VIII of England during the English Reformation.  The monarch of England held the crowns of England and Ireland in a personal union.  The Union of the Crowns in 1603 expanded the personal union to include Scotland.  The personal union between England and Scotland became a political union with the enactments of the Acts of Union 1707, which created the Kingdom of Great Britain.  The crowns of Great Britain and Ireland remained in personal union until it was ended by the Acts of Union 1800, which united Ireland and Great Britain into the United Kingdom of Great Britain and Ireland from January 1801 until December 1922. The coat of arms of Ireland is blazoned as "Azure a harp Or, stringed Argent" (a gold harp with silver strings on a blue background).  These arms have long been Ireland's heraldic emblem.  References to them as being the arms of the king of Ireland can be found as early as the 13th century.  These arms were adopted by Henry VIII of England when he ended the period of Lordship of Ireland and declared Ireland to be a kingdom again in 1541.  When the crowns of England, Scotland and Ireland were united in 1603, they were integrated into the unified royal coat of arms of kingdoms of England, Scotland and Ireland.  The harp was adopted as the emblem of the Irish Free State when it separated from the United Kingdom in 1922.  They were registered as the arms of Ireland with the Chief Herald of Ireland on 9 November 1945. Margaret Tudor (28 November 1489 – 18 October 1541) was Queen of Scots from 1503 until 1513 by marriage to James IV of Scotland and then, after her husband died fighting the English, she became regent for their son James V of Scotland.  She was born at Westminster Palace as the oldest daughter of Henry VII of England and Elizabeth of York, and granddaughter of Margaret Beaufort, Edward IV of England and Queen Elizabeth Woodville.  Margaret Tudor had several pregnancies, but most of her children died young or were stillborn.  As queen dowager she married Archibald Douglas, 6th Earl of Angus.  Through her first and second marriages, respectively, Margaret was the grandmother of both Mary, Queen of Scots, and Mary's second husband, Lord Darnley.  Margaret's marriage to James IV foreshadowed the Union of the Crowns – their great-grandson, James VI and I, was the first to be monarch of both Scotland and England. Sophia Stuart (22 June – 23 June 1606) was the fourth daughter and seventh and final child of King James VI and I by his wife Anne of Denmark.  She was born at Greenwich Palace on 22 June 1606 and died there the next day.  She was buried in King Henry's Chapel, Westminster Abbey, in a monument designed by Maximilian Colt that resembles a stone cradle.  She was likely named for her maternal grandmother, Sophie of Mecklenburg-Güstrow. Anne of Denmark (Danish: "Anna" ; 12 December 1574 – 2 March 1619) was Queen consort of Scotland, England, and Ireland by marriage to King James VI and I. Sophia of the Palatinate (commonly referred to as Sophia of Hanover; 14 October 1630 – 8 June 1714) was the Electress of Hanover from 1692 to 1698.  As a granddaughter of James VI and I, she became heir presumptive to the crowns of the Kingdom of England and the Kingdom of Ireland under the Act of Settlement 1701.  After the Acts of Union 1707, she became heir presumptive to the unified throne of the Kingdom of Great Britain.  She died less than two months before she would have become queen, and her claim to the throne passed on to her eldest son, George Louis, Elector of Hanover, who ascended as George I on 1 August 1714 (Old Style). There has not been a government of England since 1707 when the Kingdom of England ceased to exist as a sovereign state, as it merged with the Kingdom of Scotland to form the Kingdom of Great Britain.  Kingdom of Great Britain continued from 1707 until 1801 when it merged with the Kingdom of Ireland to form the United Kingdom of Great Britain and Ireland, which itself became the United Kingdom of Great Britain and Northern Ireland (UK) in 1922 (in reality; in name in 1927) upon independence for most of the island of Ireland.  The UK since then has gone through significant change to its system of government, with devolved parliaments, assemblies and governments in Scotland, Wales and Northern Ireland.  England, however, remains under the full jurisdiction, on all matters, of the Parliament of the United Kingdom of Great Britain and Northern Ireland and the UK government as no devolved administration has been created for England within the new structure.  This situation has led to the anomaly, known as the West Lothian question, which is that Scottish Members of Parliament (MPs) are able to vote on legislation that affects only England whereas English MPs can not vote on certain Scottish matters due to devolution.  In some cases, such as top-up university tuition fees and foundation hospitals, the votes of Scottish MPs have been crucial in helping pass legislation for England that the majority of English MPs have opposed. The 1935-36 British Home Championship was a football tournament played between the British Home Nations during the 1935–36 season.  It was won by Scotland after a close contest between Scotland, Wales and England.  England began the tournament the stronger team, with a 3–1 win over Ireland in Belfast while Scotland struggled to a 1–1 draw with Wales.  Scotland recovered to beat Ireland in their second match whilst England dropped position after defeat by Wales.  Wales and Ireland played a tough, high-scoring game which might have given Wales the title, but was ultimately won by the Irish, whilst Scotland came to London knowing that only a win would be enough to give them the trophy.  In a furious attacking game the end result; 1–1, was enough to give Scotland an undisputed tournament success.
Answer: Anne of Denmark