uses crt;
const s='*';
var a,b,c,x,y:integer;
procedure inngon(dong,x,y:integer);
var i,j,m:integer;
begin
for i:=1 to dong do
begin
if i=1 then m:=1
else m:=m+2;
gotoxy(x,y);
for j:=1 to m do
write(s);
x:=x-1;
y:=y+1;
end;
end;
procedure inthan(dong,ngon,x,y:integer);
var i:integer;
begin
for i:=1 to dong do
begin
gotoxy(x-2,y+ngon);
write(s,s,s,s,s);
y:=y+1;
end ;
end;
procedure inday(dong,ngon,than,x,y:integer);
var i,j:integer;
begin
for i:=1 to dong do
begin
gotoxy(x-((ngon*2-1) div 2),y+ngon+than);
for j:=1 to ngon*2-1 do
write(s);
y:=y+1;
end;
end;
begin
clrscr;
x:=40;y:=1;
write('H ngon =');readln(a);
write('H than =');readln(b);
write('H goc =');readln(c);
inngon(a,x,y);
inthan(b,a,x,y);
inday(c,a,b,x,y);
readln;
end.