This problem might have no solution.
For example, the 100 children can be divided into two groups such that there
is no link between the two groups. A link represents a friend relationship
between two children. If the numbers of children in the above two groups are
49 and 51, respectively. There is no way to construct such 10 groups, each
containing 10 children.
So any algorithm leading to the final solution should be cable to determine whether
or not there exists a solution to a given collectio