In my opinion the EU needs to trace the contagion effect and limit its effects.
It can do this by offering to take over all credit default swaps on Greece's bonds, no sane economic actor is going to refuse that when a default is imminent.
What happens then is that the ECB absorbs all losses from a Greece default, blowing a large hole in its balance sheet.
However the ECB can just print itself back into solvency.
The aftermath will be a period of high inflation.