Scanner s = new Scanner(System.in);
int n = s.nextInt();
// * * * - * * *
// * * - - - * *
// * - - - - - *
// - - - - - - -
// * - - - - - *
// * * - - - * *
// * * * - * * *
//
// row
int row = 1;
// work
int nst = n / 2;
int nsp = 1;
while (row <= n) {
// work stars
int cst = 1;
while (cst <= nst) {
System.out.print("* ");
cst++;
}
// work spaces
int csp = 1;
while (csp <= nsp) {
System.out.print("- ");
csp++;
}
// work stars
// int cst=1; says duplicate variable
while (cst <= nst) {
System.out.print("* ");
cst++;
}
// preparation
if (row <= n / 2) {
nst--;
nsp = nsp + 2;
} else {
nst++;
nsp = nsp - 2;
}
System.out.println();
row++;
}