Completed Hungarian algorithm.