program pesegibintang2;
var
 a,b,c : smallint;
begin
read(a);
for b:= 1 to a do
 begin
  for c := 1 to a do
   begin
    if((b=1) or (b=a) or (c=1) or (c=a) or (b=c))then
     write('*')
    else
     write(' ');
   end;
   writeln;
 end; 
end.