m=raw_input() L=len(m) R=range(L) for r in R:print"".join((m[c]+" ")[L-2!=c!=1<=(r-c)*(L+~r-c)]for c in R)