Input: Article: This situation prevailed until 1639, when most of Alsace was conquered by France so as to keep it out of the hands of the Spanish Habsburgs, who wanted a clear road to their valuable and rebellious possessions in the Spanish Netherlands. Beset by enemies and seeking to gain a free hand in Hungary, the Habsburgs sold their Sundgau territory (mostly in Upper Alsace) to France in 1646, which had occupied it, for the sum of 1.2 million Thalers. When hostilities were concluded in 1648 with the Treaty of Westphalia, most of Alsace was recognized as part of France, although some towns remained independent. The treaty stipulations regarding Alsace were complex; although the French king gained sovereignty, existing rights and customs of the inhabitants were largely preserved. France continued to maintain its customs border along the Vosges mountains where it had been, leaving Alsace more economically oriented to neighbouring German-speaking lands. The German language remained in use in local administration, in schools, and at the (Lutheran) University of Strasbourg, which continued to draw students from other German-speaking lands. The 1685 Edict of Fontainebleau, by which the French king ordered the suppression of French Protestantism, was not applied in Alsace. France did endeavour to promote Catholicism; Strasbourg Cathedral, for example, which had been Lutheran from 1524 to 1681, was returned to the Catholic Church. However, compared to the rest of France, Alsace enjoyed a climate of religious tolerance.

Now answer this question: When did the Habsburgs  sell the Sundgau territory to France?

Output: 1646

Input: Article: Among the results of the Greek and Islamic influence on this period in European history was the replacement of Roman numerals with the decimal positional number system and the invention of algebra, which allowed more advanced mathematics. Astronomy advanced following the translation of Ptolemy's Almagest from Greek into Latin in the late 12th century. Medicine was also studied, especially in southern Italy, where Islamic medicine influenced the school at Salerno.

Now answer this question: What influential astronomy text did Ptomely author?

Output: Almagest

Input: Article: In most parts of medieval Europe, the upper class obtained the sole rights to hunt in certain areas of a feudal territory. Game in these areas was used as a source of food and furs, often provided via professional huntsmen, but it was also expected to provide a form of recreation for the aristocracy. The importance of this proprietary view of game can be seen in the Robin Hood legends, in which one of the primary charges against the outlaws is that they "hunt the King's deer". In contrast, settlers in Anglophone colonies gloried democratically in hunting for all.

Now answer this question: The importance of can be seen in what legends?

Output:
Robin Hood