#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 v = 0;
int u = n - 2;
while ( v < u )
{
cout <<" ";
v ++;
}
cout << "*";
cout << '\n';
y ++;
}
int r = 0;
while ( r < n )
{
cout << "*";
r ++;
}
return 0;
}