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