a="$System.in".toLowerCase().replaceAll(/[^a-z ]/,'').tokenize() (a as SortedSet).each{println a.count(it)+' '+it}