#include<stdio.h>
int main () {
int n,j,i,pom;  
  scanf("%d", &n);
  if(n<1)
  printf("-1");
  for(i=1;i<=n;i++)
  {for(j=1;j<=n;j++)
    printf(" ");
    pom=n-1;
  for(j=1;j<=pom;j++)
    if(j==1 || j==pom)
    {printf("*");}
    else
    printf(" ");
  
  }
  return 0;
}