#include <iostream>

using namespace std;

int main()

{

    int cnt=1,flag=0;

    string a[6]={"    *","   **","  ***"," ****","*****"};

    string b[6]={"*    ","**   ","***  ","**** ","*****"};

    for(int i=0;; i+=cnt)

    {

    if(flag==0)

    cout << a[i];

    else

    cout << b[i];

    cout << endl;

    if(i==4&!flag)

    {cout << a[i]<<endl; cnt=-1;}

    else if(i==4&flag)

    {cout << b[i]<<endl; cnt=-1;}

    else if(cnt==-1&!i&!flag)

    {flag++; cout <<endl; cout << b[i] <<endl; cnt=1;}

    else if(cnt==-1&!i&flag)

    break;

    }

}