L=io.read("*l")H=L:sub(1,1)S=L:len()-1 print(L..H)for i=1,S do print(L:sub(-i,-i)..(" "):rep(S)..L:sub(i+1,i+1))end print(H..L:reverse())