using System;
namespace Test
{
class Tst
{
static void Main()
{
Console.WriteLine("Please enter you number!");
int a=Convert.ToInt32((Console.ReadLine()));
string[,] b=new string[21,21];
if(a<1||a>20)
{
Console.WriteLine("Sorry you enter Num is wrong!");
return;
}
else
{
if(a>=2||a<=20)
{
int j,k;
for(j=0;j<=a-1;j++)
{
for(k=0;k<=a-1;k++)
{
if((j==0)||(k==0)||(j==(a-1))||(k==(a-1)))
{
b[j,k]="*";
}
else
{
b[j,k]=" ";
}
}
}
for(j=0;j<=a-1;j++)
{
for(k=0;k<=a-1;k++)
{
//if(j==(a/2)){Console.WriteLine();}
Console.Write(b[j,k]);
}
Console.WriteLine();
}
}
return;
}
}
}
}