#!/usr/bin/perl -w $n{$_}++for split/[\n.]*/,<>;print"$n{$_} x $_\n"for sort{$n{$b}<=>$n{$a}}keys%n