the first of each group are classified for the finals