import re def f(m):c=m.group().count;return'10'[c('1')<c('0')] while~0:s=raw_input();exec"s=re.sub('{[01]+}',f,s);"*11;print s
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page