d=[0]*?d a=*"@\x11\x0f!\x0fS)Fb2Z\x11U^$I)YR%,4PB\x13=V7\x151557P\x1a_\x19(J U2`KQK=\x0d\x0e\x12J]\x0d\x07T".bytes 1.upto(gets.to_i){|i|d[a[i%=55]%=?d]+=1;i<54||a.map{a[i-31]-=v=a[i];i<7&&a[i-7]+=v;i-=1}} (0..99).zip(d){|c|puts c*"\x09"}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).