w=io.write a=io.read()b=#a w(a)for i=1,b do w(a:sub(i,i),"\n",a:sub(b-i+1,b-i+1))z=i==b or w((" "):rep(b-1))end w(a:reverse())