https://www.acmicpc.net/problem/10996
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int f=0;
if(n==1) System.out.print("*");
else{
for(int i=1;i<=2*n;i++){
for(int j=1;j<=n/2;j++){
if(i%2==1&&n%2==0){
if(f==0){
System.out.print("*");
f++;
}
if(j<n/2) System.out.print(" *");
}
else if(i%2==1&&n%2==1){
if(f==0){
System.out.print("*");
f++;
}
System.out.print(" *");
}
else{
System.out.print(" *");
}
}
f=0;
System.out.println();
}
}
}
}