Question: In what year did the pope return from Avignon to the city Gioffre Borgia's father lived in when he died?

full_context: Document 1: Napoleon: Unhappy with this change of policy by the Portuguese government, Napoleon sent an army to invade Portugal. On 17 October 1807, 24,000 French troops under General Junot crossed the Pyrenees with Spanish cooperation and headed towards Portugal to enforce Napoleon's orders. This attack was the first step in what would eventually become the Peninsular War, a six-year struggle that significantly sapped French strength. Throughout the winter of 1808, French agents became increasingly involved in Spanish internal affairs, attempting to incite discord between members of the Spanish royal family. On 16 February 1808, secret French machinations finally materialized when Napoleon announced that he would intervene to mediate between the rival political factions in the country. Marshal Murat led 120,000 troops into Spain and the French arrived in Madrid on 24 March, where wild riots against the occupation erupted just a few weeks later. Napoleon appointed his brother, Joseph Bonaparte, as the new King of Spain in the summer of 1808. The appointment enraged a heavily religious and conservative Spanish population. Resistance to French aggression soon spread throughout the country. The shocking French defeat at the Battle of Bailén in July gave hope to Napoleon's enemies and partly persuaded the French emperor to intervene in person.
Document 2: Late Middle Ages: Avignon was the seat of the papacy from 1309 to 1376. With the return of the Pope to Rome in 1378, the Papal State developed into a major secular power, culminating in the morally corrupt papacy of Alexander VI. Florence grew to prominence amongst the Italian city-states through financial business, and the dominant Medici family became important promoters of the Renaissance through their patronage of the arts. Other city states in northern Italy also expanded their territories and consolidated their power, primarily Milan and Venice. The War of the Sicilian Vespers had by the early 14th century divided southern Italy into an Aragon Kingdom of Sicily and an Anjou Kingdom of Naples. In 1442, the two kingdoms were effectively united under Aragonese control.
Document 3: Sancha of Aragon: Sancha of Aragon (1478 in Gaeta – 1506 in Naples), or Sancia of Aragon, was an illegitimate daughter of King Alfonso II of Naples and his mistress Trogia Gazzela. In 1494, she was married to Gioffre Borgia, youngest son of Pope Alexander VI. Upon her marriage, she and her husband were created Prince and Princess of Squillace, a province in the south of Italy. For the majority of their marriage, Sancha and her husband lived in the Vatican with the rest of his family. There Sancha became friends with her sister-in-law Lucrezia, and allegedly had affairs with both of her husband's older brothers: Juan Borgia, 2nd Duke of Gandia, also known as Giovanni Borgia, and Cesare Borgia. Her affair with Juan is sometimes said to be the reason for Cesare's alleged murder of Juan in 1497.
Document 4: Palermo: After the Treaty of Utrecht (1713), Sicily was handed over to the Savoia, but by 1734 it was again a Bourbon possession. Charles III chose Palermo for his coronation as King of Sicily. Charles had new houses built for the growing population, while trade and industry grew as well. However, by now Palermo was now just another provincial city as the Royal Court resided in Naples. Charles' son Ferdinand, though disliked by the population, took refuge in Palermo after the French Revolution in 1798. His son Alberto died on the way to Palermo and is buried in the city. When the Kingdom of the Two Sicilies was founded, the original capital city was Palermo (1816) but a year later moved to Naples.
Document 5: Avignon Papacy: Following the strife between Philip IV of France and Pope Boniface VIII and the death of his successor Benedict XI after eight months in office, a deadlocked conclave elected Clement V, a Frenchman, as Pope in 1305. Clement declined to move to Rome, remaining in France, and in 1309, he moved his court to the papal enclave at Avignon, where it remained for the next 67 years. The absence from Rome is sometimes referred to as the ``Babylonian Captivity of the Papacy ''. A total of seven popes reigned at Avignon; all were French, and they increasingly fell under the influence of the French Crown. On September 13, 1376, Gregory XI abandoned Avignon and moved his court to Rome (arriving on January 17, 1377), ending the Avignon Papacy.
Document 6: Gioffre Borgia: Gioffre Borgia (born 1481 or 1482; died 1516 or 1517), also known as Goffredo (Italian), or Jofré Borja (Catalan), was the youngest son of Pope Alexander VI and Vannozza dei Cattanei, and a member of the House of Borgia. He was the youngest brother of Cesare, Giovanni, and Lucrezia Borgia.
Document 7: Lucrezia Borgia: Lucrezia Borgia (; ; 18 April 1480 – 24 June 1519) was a Spanish-Italian noblewoman of the House of Borgia who was the daughter of Pope Alexander VI and Vannozza dei Cattanei. She reigned as the Governor of Spoleto, a position usually held by cardinals, in her own right.
Document 8: Juan Castellar y de Borja: Juan Castellar y de Borja was born in Valencia in late 1441, the son of Galcerán de Castellar, "señor" de Picassent, and his wife Bernardona Borja. The Castellar family was allied with the Borja family. He was a cousin of Cardinal Juan de Borja Lanzol de Romaní, "el mayor".
Document 9: Avignon Papacy: Clement V declined to move to Rome, remaining in France, and in 1309, he moved his court to the papal enclave at Avignon, where it remained for the next 67 years. The absence from Rome is sometimes referred to as the ``Babylonian Captivity of the Papacy ''. A total of seven popes reigned at Avignon; all were French, and they increasingly fell under the influence of the French Crown. On September 13, 1376, Gregory XI abandoned Avignon and moved his court to Rome (arriving on January 17, 1377), ending the Avignon Papacy.
Document 10: Late Middle Ages: The French crown's increasing dominance over the Papacy culminated in the transference of the Holy See to Avignon in 1309. When the Pope returned to Rome in 1377, this led to the election of different popes in Avignon and Rome, resulting in the Papal Schism (1378–1417). The Schism divided Europe along political lines; while France, her ally Scotland and the Spanish kingdoms supported the Avignon Papacy, France's enemy England stood behind the Pope in Rome, together with Portugal, Scandinavia and most of the German princes.
Document 11: Franceschetto Cybo: Despite his exceeding passion for card playing, he received from his father important positions in the Papal States: governor of Rome (1488), the fiefs of Cerveteri and Anguillara (1490) and the title of Count of the Lateran Palace. In 1490 he attempted to steal the Papal treasure.
Document 12: Avignon Papacy: Beginning with Clement V, elected 1305, all popes during the Avignon papacy were French. However, this makes French influence seem greater than it was. Southern France at that time had a culture quite independent from Northern France, where most of the advisers to the King of France were based. The Kingdom of Arles was still independent at that time, formally a part of the Holy Roman Empire. The literature produced by the troubadours in the Languedoc is unique and strongly distinct from that of Royal circles in the north. Even in terms of religion, the South produced its own variety of Christianity, Catharism, which was ultimately declared heretical. The movement was fueled in no small part by the strong sense of independence in the South even though the region had been severely weakened during the Albigensian Crusade a hundred years before. By the time of the Avignon Papacy, the power of the French King in this region was uncontested, although still not legally binding.
Document 13: Pope Alexander VI: On 25 January 1494, Ferdinand I died and was succeeded by his son Alfonso II (1494–1495). Charles VIII of France now advanced formal claims on the Kingdom of Naples. Alexander authorised him to pass through Rome, ostensibly on a crusade against the Ottoman Empire, without mentioning Naples. But when the French invasion became a reality Pope Alexander VI became alarmed, recognised Alfonso II as king of Naples, and concluded an alliance with him in exchange for various fiefs for his sons (July 1494). A military response to the French threat was set in motion: a Neapolitan army was to advance through the Romagna and attack Milan, while the fleet was to seize Genoa. Both expeditions were badly conducted and failed, and on 8 September Charles VIII crossed the Alps and joined Ludovico il Moro at Milan. The Papal States were in turmoil, and the powerful Colonna faction seized Ostia in the name of France. Charles VIII rapidly advanced southward, and after a short stay in Florence, set out for Rome (November 1494).
Document 14: Anna d'Este: Anna d'Este was born on 16 November 1531, the eldest daughter of the Duke of Ferrara Ercole II (son of Lucrezia Borgia and grandson of Pope Alexander VI) and his wife, Renée of France (daughter of King Louis XII of France). She grew up in Ferrara, where she received an excellent education. The future writer and scholar Olympia Fulvia Morata was chosen as one of her companions at court.
Document 15: Avignon Papacy: The Avignon Papacy was the period from 1309 to 1376 during which seven successive popes resided in Avignon (then in the Kingdom of Arles, part of the Holy Roman Empire, now in France) rather than in Rome. The situation arose from the conflict between the papacy and the French crown, culminating in the death of Pope Boniface VIII after his arrest and maltreatment by Philip IV of France. Following the further death of Pope Benedict XI, Philip forced a deadlocked conclave to elect the French Clement V as pope in 1305. Clement refused to move to Rome, and in 1309 he moved his court to the papal enclave at Avignon, where it remained for the next 67 years. This absence from Rome is sometimes referred to as the "Babylonian Captivity of the Papacy".
ground_truth: 1377
sub_queries: Who fathered Gioffre Borgia? Answer: Alexander VI
What city did Pope Alexander VI live when he died? Answer: Rome
In what year did the Pope return to Rome from Avignon? Answer: 1377