import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
char c = sc.next().charAt(0);
int col = (int)Math.round(n*1.0/2);
for(int i = 1 ; i <= col ; i++) {
for(int j = 1 ; j <= n ; j++) {
if(i == 1 || i == col || j == 1 || j == n) {
System.out.print(c);
} else {
System.out.print(" ");
}
}
System.out.println();
}
}
}