The Functional Group Matching Game