s=list(raw_input()) a=[s]*len(s) i=0 for x in a: i-=1;a[i]=x*1;print`x`[2::5] if i+2:s[i]=s[~i]=' '