Task: Question Generation
Input (English): Passage: The 1688 Glorious Revolution replaced James II and VII with his Protestant daughter Mary II and her husband William III and II. Since neither Mary or her sister Anne had surviving children, the 1701 Act of Settlement ensured a Protestant successor by excluding Catholics from the English and Irish thrones, and that of Great Britain after the 1707 Act of Union. When Anne became the last Stuart monarch in 1702, her heir was the distantly related but Protestant Sophia of Hanover, not her Catholic half-brother James Francis Edward. Sophia died two months before Anne in August 1714; her son became George I and the pro-Hanoverian Whigs controlled government for the next 30 years.
Output (English): Which happened first, the death of Sophia or the death of Anne?