<>;@a=/./g,map++$h{join"",sort@a,$_},a..z for<>;printf grep$h{$_}<2,keys%h,-1