s=input() n=9 while~n:print('',*[["_ "[i<n]*-~i,"|%%%ds"%i%"|"][i>n]for i in map(int,s)]);n-=1
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page