#include <iostream>
using namespace std;
int main()
{

int i , n;
cin >> n;
i = 0;

    while ( i < n )
    {
       cout <<"*";
       i ++;
    }

cout <<'\n';

    int y = 2;
    while ( y < n )
    {

      cout << "*";


               
                int z = 0;
                int a = z;
                while ( z < a )
                {

                      cout << " ";
                      z ++;
                }

            cout << "*";
            a ++;

                int b = 0;
                int m = n - 3;
                while ( b < m )
                {

                      cout << " ";
                      b ++;
                }

            cout << "*";
            cout << '\n';

      y ++;
      m --;
    }



    int r = 0;
    while ( r < n )
    {

      cout << "*";
      r ++;
    }

     
     
     
     
     
     
     
     
     
      return 0;
}