the first two of each group classified for finals