a=raw_input() j=l=len(a) for c in a:print[(" "*~-abs(j/2)).join(c*3).center(l),a][j==1];j-=2