program NowIKnowMyABCs; var c: char; first: boolean; infile, outfile: text; letter: array['A'..'Z'] of integer; line: string; x, Y: integer; begin assign(infile,'DATA41.txt'); reset(infile); assign(outfile,'OUT41.txt'); rewrite(outfile); for x:=1 to 5 do begin for c:='A' to 'Z' do letter[c]:=0; readln(infile,line); for y:= 1 to length(line) do if upcase(line[y]) in ['A'..'Z'] then inc(letter[upcase(line[y])]); first:=true; for c:='A' to 'Z' do begin if letter[c]<>0 then begin if first then begin first:=false; write(outfile,c,'-',letter[c]); end else begin write(outfile,':',c,'-',letter[c]); end; end; end; writeln(outfile); end; close(infile); close(outfile); end.