Game-based Team Grouping Module in Python