Instructions: In this task, you are given a text of many news articles seperated by special token "|||||". Your task is to summarize them.
Input: Media playback is unsupported on your device Media caption Donald Tusk: "After 17 hours of negotiations we have reached agreement" 
  
 Eurozone leaders have agreed to offer Greece a third bailout, after marathon talks in Brussels. 
  
 Amid one of the worst crises in the EU's history, the head of the European Commission said the risk of Greece leaving the eurozone had been averted. 
  
 Greek Prime Minister Alexis Tsipras said that after a "tough battle", Greece had secured debt restructuring and a "growth package". 
  
 The bailout is conditional on Greece passing agreed reforms by Wednesday. 
  
 These include measures to streamline pensions, raise tax revenue and liberalise the labour market. 
  
 An EU statement spoke of up to €86bn (£61bn) of financing for Greece over three years. 
  
 Though it included an offer to reschedule Greek debt repayments "if necessary", there was no provision for the reduction in Greek debt - or so-called "haircut" - that the Greek government had sought. 
  
 Bailout deal at a glance 
  
 Follow our live updates 
  
 Greece 'back in serious recession' despite rescue 
  
 Parliaments in several eurozone states also have to approve any new bailout. 
  
 "There will not be a 'Grexit'," said European Commission chief Jean-Claude Juncker, referring to the fear that if there had been no deal, Greece could have crashed out of the euro. 
  
 Mr Tsipras also said he had the "belief and the hope that... the possibility of 'Grexit' is in the past". 
  
 "The deal is difficult but we averted the pursuit to move state assets abroad," he said. "We averted the plan for a financial strangulation and for the collapse of the banking system." 
  
 The Greek PM returned to Athens after the talks and went straight into a meeting with Finance Minister Euclid Tsakalotos and other party officials. 
  
 Mr Tsipras must get several unpopular measures through the Greek parliament in the next two days, including sales tax increases and pension reforms, to continue the third bailout process. 
  
 Image copyright AFP Image caption Greeks had an anxious wait as talks in Brussels dragged on 
  
 Analysis: Gavin Hewitt, BBC News, Athens 
  
 Athens has been offered a third bailout. Bankruptcy - the spectre of a failed state - has been avoided, and Greece will stay inside the euro. But the deal has left many Greeks humiliated. It is not just the ranks of the left that are using the word "surrender". 
  
 Greek Prime Minister Alexis Tsipras will have to rush key measures on pension reforms, tax increases and a debt repayment fund through parliament. It will be a bruising process. Only then will bridging loans be released that will enable Greece to meet a payment to the European Central Bank next Monday. 
  
 As it is, the deal will almost certainly lead to snap elections. Mr Tsipras will reshuffle his cabinet and discard those cabinet ministers who opposed his latest proposal. 
  
 Greek anger at eurozone debt deal 
  
 Harsh deal leaves European vision tainted 
  
 Rifts between Europe's superpowers 
  
 Economic consequences for Greece 
  
 Jeroen Dijsselbloem, the head of the eurozone group of finance ministers, said the agreement included a €50bn Greece-based fund that will privatise or manage Greek assets. Out of that €50bn, €25bn would be used to recapitalise Greek banks, he said. 
  
 Greek banks have been closed for two weeks, with withdrawals at cash machines limited to €60 per day. The economy has been put under increasing strain, with some businesses closing and others struggling to pay suppliers. 
  
 Monday saw the European Central Bank maintain its cap on emergency funds being provided to Greek banks, meaning they will stay shut for now to prevent them running out of funds. 
  
 Media playback is unsupported on your device Media caption There have been mixed views on the streets of Athens to the new agreement 
  
 Media playback is unsupported on your device Media caption Greek reforms - in 60 seconds 
  
 Eurozone finance ministers meeting in Brussels have discussed providing "bridge financing" that would cover Greece's short-term needs, but have made no final decisions. 
  
 "The road will be long, and judging by the negotiations tonight, difficult," German Chancellor Angela Merkel said on Monday morning. 
  
 French President Francois Hollande said the agreement had allowed Europe to "preserve integrity and solidarity". 
  
 "We also had to show that Europe is capable of solving a crisis that has menaced the eurozone for several years," he said. 
  
 Greek debt crisis timeline 
  
 26 June: Greece halts talks with creditors and calls referendum on bailout terms 
  
 Greece halts talks with creditors and calls referendum on bailout terms 28 June: European Central Bank (ECB) limits emergency funding to Greece; Greece imposes capital controls, forcing banks to stay shut 
  
 European Central Bank (ECB) limits emergency funding to Greece; Greece imposes capital controls, forcing banks to stay shut 30 June: Eurozone bailout expires, Greece misses €1.6bn payment to IMF 
  
 Eurozone bailout expires, Greece misses €1.6bn payment to IMF 5 July: Greeks overwhelmingly vote "No" in referendum, rejecting creditors' conditions 
  
 Greeks overwhelmingly vote "No" in referendum, rejecting creditors' conditions 9 July: Greek Prime Minister Alexis Tsipras presents new proposals to creditors, including measures rejected in referendum 
  
 Greek Prime Minister Alexis Tsipras presents new proposals to creditors, including measures rejected in referendum 13 July: Eurozone leaders agree to offer Greece third bailout 
  
 And looking forward... 
  
 15 July: Greek parliament to pass reforms demanded by creditors 
  
 Greek parliament to pass reforms demanded by creditors 16-17 July: Possible votes in eurozone member state parliaments on bailout 
  
 Possible votes in eurozone member state parliaments on bailout 20 July: Greece due to make €3.5bn payment to ECB 
  
 Mr Juncker said: "In this compromise, there are no winners and no losers. 
  
 "I don't think the Greek people have been humiliated, nor that the other Europeans have lost face. It is a typical European arrangement." 
  
 However, many Greeks and others who thought that unduly harsh terms were being imposed on Greece have expressed their widespread anger online using the hashtag #ThisIsACoup. 
  
 Mr Tsipras came to power after his left-wing Syriza party won elections in January on a promise to end austerity. Greece has already received two bailouts totalling €240bn since 2010. 
  
 Europe shares rise on news of deal ||||| BRUSSELS (AP) — Greece reached a deal with its European creditors Monday that avoids an exit from the euro and the global financial chaos that prospect had raised. The deal calls for Greece, already reeling from harsh austerity measures, to cut back even further in exchange for more loans without which its financial system would surely collapse. 
  
 Greek Finance Minister Euclid Tsakalotos, right, speaks with Managing Director of the International Monetary Fund Christine Lagarde during a round table meeting of eurogroup finance ministers at the EU... (Associated Press) 
  
 A presidential guard, right, stands guard at the tomb of the unknown soldier as riot police officers guard one of the entrances to the parliament during a demonstration of supporters of the no vote in... (Associated Press) 
  
 German Chancellor Angela Merkel, left, speaks with French President Francois Hollande, center, and Greek Prime Minister Alexis Tsipras during a meeting of eurozone heads of state at the EU Council building... (Associated Press) 
  
 German Finance Minister Wolfgang Schaeuble, sitting center, goes over papers with members of his delegation during a round table meeting of eurogroup finance ministers at the EU Lex building in Brussels... (Associated Press) 
  
 French President Francois Hollande said the Greek parliament would convene within hours to adopt the reforms called for in the plan, and he celebrated Greece's continued membership in the euro. For the eurozone to have lost Greece, Hollande said, would have been to lose "the heart of our civilization." 
  
 The agreement came after months of often bitter negotiations and a summit that stretched from Sunday afternoon well into Monday morning. Greek Prime Minister Alexis Tsipras had been holding out for a better deal to sell to his reluctant legislature in Athens this week, even as financial collapse grew closer by the day. 
  
 A breakthrough came in a meeting between Tsipras, Hollande, German Chancellor Angela Merkel and EU President Donald Tusk, after the threat of expulsion from the euro put intense pressure on Tsipras to swallow politically unpalatable austerity measures in exchange for the country's third bailout in five years. 
  
 "We took the responsibility of the decision to be able to avert the harshest outcome," Tsipras said. "We managed to avert the demand to transfer Greek assets abroad, to avert the collapse of the banking system." 
  
 The deal includes commitments from Tsipras to push a drastic austerity program including pension, market and privatization reforms through parliament by Wednesday. In return, the 18 other eurozone leaders committed to start talks on a new bailout program that should stave off the imminent collapse of the Greek financial system. 
  
 A Cypriot official said the creditors would look into bridge financing for Greece later Monday, suggesting that the political decision could pave the way for the European Central Bank to extend emergency liquidity assistance to Greek banks. Without it, they risk running out of cash this week. The official spoke only on condition of anonymity because he was not authorized to discuss the deal publicly. 
  
 If the talks had failed, Greece could have faced bankruptcy and a possible exit from the euro, the European single currency that the country has been a part of since 2002. No country has ever left the joint currency, which launched in 1999, and there is no mechanism in place for one to do so. 
  
 Greece had requested a three-year, 53.5 billion-euro ($59.5 billion) financial package, but that number grew larger by the tens of billions as the negotiations dragged on and the leaders calculated how much Greece will need to stay solvent. 
  
 A discussion paper put to eurozone leaders Sunday and obtained by The Associated Press spoke of a potential "time-out from the euro area" for Greece if no agreement could be found. 
  
 Greece has received two previous bailouts, totaling 240 billion euros ($268 billion), in return for deep spending cuts, tax increases and reforms from successive governments. Although the country's annual budget deficit has come down dramatically, Greece's debt burden has increased as the economy has shrunk by a quarter. 
  
 The Greek government has made getting some form of debt relief a priority and hopes that a comprehensive solution will involve European creditors at least agreeing to delayed repayments or lower interest rates. 
  
 Greek debt stands at around 320 billion euros ($357 billion) — a staggering 180 percent or so of the country's annual gross domestic product. Few economists think that debt will ever be fully repaid. Last week, the International Monetary Fund said Greece's debt will need to be restructured. 
  
 ___ 
  
 Menelaos Hadjicostis and John-Thor Dahlburg in Brussels contributed to this story. |||||
Output:
After a grueling 17 hours of talks at an emergency summit, eurozone leaders have emerged with an "aGreekment," as EU chief Donald Tusk puts it, instead of a "Grexit." Leaders have agreed—in principle—on a deal that "means continued support for Greece," Tusk said in a statement, although it will have to be passed by the parliaments of several EU countries, including Greece. European Commission head Jean-Claude Juncker says that with the deal, which includes a $55 billion fund to be created by privatizing parts of the Greek economy, Greece will not have to leave the eurozone, the BBC reports. In return for more loans to keep its economy from collapsing, the deal requires Greek Prime Minister Alexis Tsipras to bring in what the AP calls a "drastic austerity program" in a country that has already seen years of tough austerity measures—and voted against them just a week ago. The Greek leader, who had been under intense pressure to accept the deal and now has to present it to lawmakers, told reporters it had been a "tough battle" but that Greece had averted "extreme measures" and won debt restructuring. "The deal is difficult but we averted the pursuit to move state assets abroad," he said, per the BBC. "We averted the plan for a financial strangulation and for the collapse of the banking system."