[set f foreach] w [set l [regsub -all {[!-`~]} [string tol [read stdin]] ""]] {set a($w) 1} $f w\ _ [array get a] {lappend t $w} $f w [lsort $t] {puts [llength [lsearch -all $l $w]]\ $w}