var
  s: string;
  i: integer;
begin
  readln(s);
  s := s.Replace('abcd', '');
  writeln('aba | x', (s.Length - s.Replace('aba', '').Length) div 3);
  i := 1;
  while (i <= s.Length) do
    if (s[i] = '*') then
      s := s.Remove(i - 1, 1)
    else
    begin
      s := s.Insert(i, s[i]);
      i += 2;
    end;
  writeln(s);
end.