program wc(input, output);
                                                { not exactly unix wc command! }
    var
        w,                                                        { word count }
        l,                                                        { line count }
        c: integer;                                          { character count }
        ch: char;
        inword: boolean;
begin
    w := 0;
    l := 0;
    c := 0;

    while not eof(input) do begin
        inword := false;

        while not eoln(input) do begin
            read(input, ch);
            c := c + 1;
                                             { tab and space as word seperator }
            if (ch <> ' ') and (ord(ch) <> 9) then begin
                if not inword then begin
                    inword := true;
                    w := w + 1
                end
            end else
                inword := false
        end;

        readln(input);
        c := c + 1;
        l := l + 1
    end;

    writeln(l:8, w:8, c:12)
end.
