Program HOC24;
const fi='XAU.INP';
var a: string;
x: char;
f: text;
d: array['0'..'9'] of integer;
dem,i,j,dem1,s: integer;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,a);
close(f);
end;
BEGIN
ip;
dem:=0; dem1:=0; s:=0;
for i:=1 to length(a) do
begin
if a[i] in ['A'..'z'] then inc(dem);
if a[i] in ['A'..'Z'] then inc(dem1);
end;
for i:=1 to length(a) do
if a[i] in ['0'..'9'] then inc(d[a[i]]);
while a[1]=#32 do delete(a,1,1);
while a[length(a)]=#32 do delete(a,length(a),1);
while pos(#32#32,a)<>0 do delete(a,pos(#32#32,a),1);
s:=0;
for i:=1 to length(a) do
if a[i]=#32 then inc(s);
writeln('Trong xau co ',dem,' chu cai tieng anh');
writeln('Trong xau co ',dem1,' chu cai in hoa');
writeln('So lan xuat hien cua cac chu so trong xau la : ');
for x:='0' to '9' do if d[x]>0 then writeln(x,' : ',d[x]);
write('Trong xau co ',s+1,' tu');
readln
end.