program zad1;
 var sim: char;
     s: string;
     cif,c,k,pcif: integer;
     cifkol: array[1..1000] of integer;
     cifzn: array[1..1000] of integer;
begin
 assign(input,'input.txt');
 assign(output,'output.txt');
 reset(input); rewrite(output);
 k:=1;
 read(sim); s:=s+sim; val(s,cif,c);
 cifzn[k]:=cif; inc(cifkol[k]);
 pcif:=cif;
 repeat
  read(sim);
  case sim of
   '0'..'9' : begin
  s:='';
  s:=s+sim;
  val(s,cif,c);
  if not(cif=pcif) then inc(k);
  cifzn[k]:=cif; inc(cifkol[k]);
  pcif:=cif; end;
  end
 until eof;
 for c:=1 to k do
  begin
   write(cifkol[c]); write(cifzn[c]);
  end;
  close(input); close(output);
end.