for(i,0,-1+b:=(a:=File standardInput readLine)size,if(i==c:=b/2-.5,a," "repeated(b)atPut(i,d:=a at(i))atPut(c,d)atPut(b-i-1,d))println)