print map{ "

$_ = $strings{$_}

\n" } sort{ $strings{$b} <=> $strings{$a} or $a cmp $b } keys %strings;