#include <cstdio>

#define N 70

void f(char a[][N], int rank, int row, int col)
{
    if (rank == 1)
    {
        a[row][col] = '*';
        return;
    }

    int w = 1;
    int i;
    for (i = 0; i < rank - 1; i++)
        w *= 2;
    f(a, rank - 1, row, col + w / 2);     //（填空）处理顶上三角形
    f(a, rank - 1, row + w / 2, col);     //f(0,5,16,0)  //处理左下角
    f(a, rank - 1, row + w / 2, col + w); //f(0,5,16,16) //处理右下角
}

int main()
{
    char a[N][N];
    int i, j;
    for (i = 0; i < N; i++)
        for (j = 0; j < N; j++)
            a[i][j] = ' ';

    //f(a,6,0,0);
    f(a, 4, 0, 0);
    for (i = 0; i < N; i++)
    {
        for (j = 0; j < N; j++)
            printf("%c", a[i][j]);
        printf("\n");
    }

    return 0;
}
