initialize teams,and groups
writeTeams