n=0 while 1:s='%12s '%[raw_input,str][n%2]();n+=1;x=1;b=n==16;exec"s+='-------+'*(x==n&-n)or'%8s'%'|+'[b][:1<n/x%4<3];x*=2.;"*5;print s[:52].rstrip()+' winner!'*b
Note that non-ascii characters in the above source code will be escaped (such as \x9f).