#include <iostream>
using namespace std;
int main()
{
int j , n , i;
i = 0;
j = 0;
cin >> n ;
while ( i < n )
{
while ( j < n )
{
if ( i == j || i == 0 || i == n - 1 || j == 0 || j == n - 1 )
{
cout << "*";
}
j ++;
}
cout <<" ";
i ++;
}
return 0;
}