#include<stdio.h>
void print(int n)
{
int i = 0, j = 0,k=0,d=0;
for (d=n;d>0;d--)
{
for (i = 0; i < 3; i++)
{
for (j = 0; j <= n-d; j++)
{
if (j == 0)
for (k = 3 * (d - 1); k > 0; k--)
printf(" ");
for (k = 2; k > i; k--)
printf(" ");
for (k = 0; k < i + 1; k++)
printf("* ");
for (k = 2; k > i; k--)
printf(" ");
}
printf("\n");
}
}
}
int main()
{
int n = 0;
while (scanf("%d", &n)!=EOF)
{
print(n);//实现输出圣诞树顶的函数
int i = 0, j = 0;
for (i = 0; i < n; i++)//输出树干
{
for (j = 3 * n - 1; j > 0; j--)
printf(" ");
printf("*\n");
}
}
return 0;
}