x=raw_input() print x+x[0] l=len(x)-2 for i in range(l+1): print x[~i]+' '*l,x[i+1] print x[0]+x[::-1]