6. There are 1989 points in space, where no three points are collinear. Divide them into 30 groups with different numbers of points. From any 3 different groups, take one point each to form a triangle. To maximize the total number of such triangles, how many points should each group have?
(Tip: Let the number of points in the $i$-th group be $x_{i}$, then the problem is transformed into: when $x_{1}$ $+x_{2}+\cdots+x_{30}=1989$, and $x_{1}, x_{2}, \cdots, x_{30}$ are all different, find the maximum value of $M=\sum_{1<i<j<k \leqslant 30} x_{i} x_{j} x_{k}$. Without loss of generality, assume $x_{1}<x_{2}$ $<\cdots<x_{30}$, as in Example 3, it can be proved that when $M$ is maximized, (1) $x_{i+1}-x_{i}$ $\leqslant 2(i=1,2, \cdots, 29)$; (2) the number of $i$ such that $x_{i+1}-x_{i}=2$ is no more than 1. From (1) and (2), we know that the values of $x_{1}, x_{2}, \cdots, x_{30}$ can only be two types: $\alpha, \alpha+1, \alpha+2, \cdots, \alpha+29$ or $\alpha, \alpha+1, \cdots, \alpha+i-1, \alpha$ $+i+1, \cdots, \alpha+30$. The first type has no solution, and for the second type, $\alpha$ $=51, i=6$.