Var
f: text;
s: string;
i, lect, pract, lab: byte;
begin
assign(f,'lessons.txt');
reset(f);
lect := 0;
pract := 0;
lab := 0;
while not Eof(f) do begin
readln(f,s);
i := pos('лекц.',s);
if i <> 0 then lect := lect + 1
else begin
i := pos('практ.',s);
if i <> 0 then pract := pract + 1
else begin
i := pos('лаб.',s);
if i <> 0 then lab := lab + 1
end;
end;
end;
close(f);
writeln('Лекций: ', lect);
writeln('Практических: ', pract);
writeln('Лабораторных: ', lab);
end.