Task: Explanation
Input (English): Swedish Livonia (Swedish: "Svenska Livland" ) was a dominion of the Swedish Empire from 1629 until 1721. The territory, which constituted the southern part of modern Estonia (including the island of Ösel ceded by Denmark after the Treaty of Brömsebro) and the northern part of modern Latvia (the Vidzeme region), represented the conquest of the major part of the Polish-Lithuanian Duchy of Livonia during the 1600–1629 Polish-Swedish War. Parts of Livonia and the city of Riga were under Swedish control as early as 1621 and the situation was formalized in Truce of Altmark 1629, but the whole territory was not ceded formally until the Treaty of Oliva in 1660. The minority part of the Wenden Voivodeship retained by the Polish–Lithuanian Commonwealth was renamed the Inflanty Voivodeship (""Livonian Principality""), which today corresponds to the Latgale region of Latvia. Question: Swedish Livonia, which constituted the southern part of modern Estonia, was fully ceded in what peace treaty between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia? Answer: Treaty of Oliva
Output (English):  The territory, which constituted the southern part of modern Estonia including the island of Ösel ceded by Denmark after the Treaty of Brömsebro and the northern part of modern Latvia the Vidzeme region, represented the conquest of the major part of the PolishLithuanian Duchy of Livonia during the 1600–1629 PolishSwedish War.