perl -lE'$s{$_}++for<>;say keys%s'