Grouping Cards - Matching Polynomials