public class 打印十字图 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int len = 9 + (n - 1) * 4;// 行数/列数
boolean[][] flag = new boolean[len][len];
// 先填入十字架的部分
int mid = len / 2;
for (int i = mid - 2; i <= mid + 2; i++) {
flag[mid][i] = flag[i][mid] = true;
}
// 题目的意思是,给一个层数,我们要打印出含有多少层的十字架
for (int i = 1; i <= n; i++) {
// 最上下左右
for (int j = 2 * i; j < len - 2 * i; j++) {
flag[2 * i - 2][j] = true;// 上
flag[len - 2 * i + 1][j] = true;// 下
flag[j][2 * i - 2] = true;// 左
flag[j][len - (2 * i) + 1] = true;// 右
}
// 左上角
int x1 = 2 * i;
int y1 = 2 * i;
flag[x1][y1] = flag[x1][y1 - 1] = flag[x1 - 1][y1] = true;
// 右上角,x与左上角一样
int y2 = len - y1 - 1;
flag[x1][y2] = flag[x1][y2 + 1] = flag[x1 - 1][y2] = true;
// 左下角
int x2 = len - x1 - 1;
flag[x2][y1] = flag[x2][y1 - 1] = flag[x2 + 1][y1] = true;
// 右下角
flag[x2][y2] = flag[x2 + 1][y2] = flag[x2][y2 + 1] = true;
}
for (int i = 0; i < len; i++) {
for (int j = 0; j < len; j++) {
if (flag[i][j]) {
System.out.print("$");
} else {
System.out.print(".");
}
}
System.out.println();
}
}
}