s=raw_input() x=len(s) i=-x/2 for c in s:i+=1;print i and(' '*~-abs(i)).join(c*3).center(x)or s