formations class and hungarian algorithm assignment