#include <iostream>
using namespace std;
int main()
{    
    int n , first_line , last_line , middle_lines , all_spaces1 , all_spaces2 ;
    cin >> n;
    first_line = 0;
    last_line = 0;
    middle_lines = 0;
    all_spaces1 = 0;
    all_spaces2 = n - 3;


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

     cout <<'\n';
      
     while ( middle_lines < n - 2 )
     {
         cout <<"*";

          int left_spaces = 0;
          while (left_spaces < all_spaces1)
          {
             cout <<" ";
             left_spaces ++;
          }

        cout <<"*";
          
          int right_spaces = 0;
          while (right_spaces < all_spaces2)
          {
             cout <<" ";
             right_spaces ++;
          }

          all_spaces1 ++;
          all_spaces2 --;
          
         cout <<"*";
         cout <<'\n';
        middle_lines ++;
     }

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




    return 0;
}