sub b { $a=@_*@_;for(@_){%t=@_;$t=@r=$_;$t+=%t while@r=map@{delete$t{$_}},@r;$a=$t,$b=$_ if!ref&&$t<$a}$b }