the top three of each group qualify to the second phase