import re, sys print( re.sub(r'(.)\1*', lambda m: m.group(1) * (1 if len(m.group(0)) > 1 else 2), sys.stdin.read()), end='' )
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page