If Greece announced it was leaving the euro, it might declare a bank holiday. For some number of days, no one can pull their euros out of the bank (otherwise all euros leave the Greek banking system). The government would have to put a money stamping technology in place fairly rapidly. Once the banks are reopened, withdrawn money gets a stamp and it is now a Greek euro or drachma euro, trading at a lower value of course. Is there an indelible, irreversible money stamping technology and how long would it take to distribute it to every Greek bank? How about ripping off one corner of the bill? That wouldnt take long. Would corrupt bank tellers, handing out notes but refusing to rip them, undercut such a plan?
There would be a relative windfall for those who held their wealth in the form of currency rather than bank accounts. It is impractical to round up these cash balances and stamp them.
Alternatively, there are already Greek euro notes with the stamp on them of a Greek letter. The Greek government could simply announce that such notes are now drachmas. Would the market believe them and would the ECB have to make a counter-announcement, promising they are no longer full legal tender at par? Par acceptance of these notes in Italy would mean massive arbitrage and also would impose further deflation on Greece. I dont know how many of the euros circulating in Greece are in fact stamped this way. If most of them are, the problem of how to get out of the euro would be easier to solve. The bank holiday could be quite short because there is already a new currency with a physical existence in place. (But what would happen to a German citizen, in Germany, who held a lot of such notes after a vacation in Greece? Would the German government make that person whole, while limiting arbitrage from Greek citizens? Perhaps that could work, but of course Greeks would try to trade their notes to Germans. Note that non-Greek merchants would have to scrutinize accepted notes fairly closely for a while; eventually the Greek government would sub in a currency with a more distinct appearance.)