Sorting of Materials into Groups