scalar keys %{$h{$_}} == 1 and print keys %{$h{$_}} for sort keys %h;