Double Parity Vertical Redundancy Check by recursive

import sys
g=map(list,sys.stdin)
o=lambda g:[i for i in range(len(g))if list(g[i]).count("1")%2][0]
c=o(zip(*g))
g[o(g)][c]="10"[int(g[o(g)][c])]
for l in g:print "".join(l),

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top