#!/usr/bin/perl

$NTypes=0;
while ( <> ) {
    chop;
    if ( ! defined $Freq{$_} ) {
	$Word[$NTypes] = $_;
	$NTypes++;
    } 
    $Freq{$_}++;
}

for ( $i=0; $i < $NTypes; $i++ ) {
    printf "$Word[$i] $Freq{$Word[$i]}\n";
}
