// $Id: wc.ici,v 1.0 2003/01/03 12:08:00 dada Exp $
// http://dada.perl.it/shootout
//
// contributed by Tim Long

nl = nw = nc = 0;
while (l = getline())
{
    ++nl;
    nc += nels(l) + 1;
    nw += nels(smash(l, #\S+#, ""));
}
printf("%d %d %d\n", nl, nw, nc);