How to arrange the semi-finals and finals of 3 groups and 5 teams in the basketball group match?

The first round: group match, round robin, each team plays against the other four teams, and the top two teams in each group enter the second round.

The second round: knockout, six teams draw lots to determine their opponents, and the winning three teams enter the semi-finals first; The three losing teams play a round robin, and the team that wins the first place enters the semi-finals (if they win each other, it will be much better than the net victory).

The third round: semi-final, four teams draw lots to fight, the winner enters the final, and the loser decides 3-4.

The fourth round: the final.