<>;$_=++$%for@a[glob<>];$m>$a[$_]or$m=$a[$_[$_]=$_.$/]for glob<>;print@_