char s[99],t[],n;main(j,k){for(j=n=strlen(gets(s));j--;puts(t))for(k=n;k--;)t[k]=k==1|k==n-2|n-j-2