Sierpinski Carpet by hirose

s=range(3**input())
for i in s:print"".join([": "[any(1==i/k%3==j/k%3for k in[1,3,9])]*2for j in s])

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

download

return top