///好难嗷!不会呜呜呜
#include <stdio.h>
int arr[500][800] = { {0, 0, 1, 0, 0}, {0, 1, 0, 1, 0}, {1, 0, 1, 0, 1} };
int main() {
int length = 3;
int width = 5;
int n = 0;
int i = 0;
int j = 0;
int k = 0;
scanf("%d", &n);
for (i = 1; i < n; i++) { //以x个初始三角形为一层
//复制一层
for (j = length; j < length * 2; j++) {
for (k = 0; k < width; k++) {
arr[j][k] = arr[j - length][k];
arr[j][k + width + 1] = arr[j - length][k];
}
}
//由于第一层为了用来复制位置不对,调整位置
for (j = 0; j < length; j++) {
for (k = 0; k < width; k++) {
arr[j][k] = 0;
}
}
for (j = 0; j < length; j++) {
for (k = length; k < length + width; k++) {
arr[j][k] = arr[j + length][k - length];
}
}
length *= 2;
width *= 2;
width++;
}
//打印树叶
for (i = 0; i < length; i++) {
for (j = 0; j < width; j++) {
if (arr[i][j] == 0)
printf(" ");
else
printf("*");
}
printf("\n");
}
//打印树干
for (i = 0; i < n; i++) {
for (j = 0; j < width / 2; j++) {
printf(" ");
}
printf("*\n");
}
return 0;
}