*s,=input() a=[s]*len(s) i=0 for x in a: i-=1;a[i]=x*1;print(sep='',*x) if i+2:s[i]=s[~i]=' '