Double Parity Vertical Redundancy Check by recursive

import sys
g=map(list,sys.stdin)
o=lambda g:sum(i*(sum(map(ord,g[i]))%2)for i in range(len(g)))
c=o(zip(*g))
g[o(g)][c]=`1-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