Finish trajectory grouping (Dulmage-Mendelsohn decomposition).