// meow.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int a = 0;

	while (n > a)
	{
		cout << "*";
		a++;
	}
	cout << "\n";

	a = 0;
	int b = n - 2;
	int c = 0;
	while (b > c)
	{
		cout << "*";
		while (n - 2 > a)
		{
			cout << " ";
			a++;
		}
		a = 0;
		cout << "*";
		cout << "\n";
		b--;
	}
	a = 0;
	while (n > a)
	{
		cout << "*";
		a++;
	}




	return 0;
}