Given $S=\{1,2, \cdots, n\}, A_{1}, A_{2}, \cdots, A_{10}$ are all subsets of $S$, and satisfy
(1) $\left|A_{i}\right|=3, i=1,2, \cdots, 10$;
(2) $A_{i} \cap A_{j} \neq \varnothing, 1 \leqslant i<j \leqslant 10$;
(3) Each element in $S$ belongs to at least one of $A_{1}, A_{2}, \cdots, A_{10}$, and at most to 5 subsets.
Find all possible values of $n$.
Solution: From (1) and (3), we know that each $A_{i}$ contains 3 elements, and the 10 subsets have a total of 30 elements. Each element belongs to at most 5 subsets, so $n \geqslant 6$.
When $n=6$, the following 10 subsets satisfy the problem's requirements:
$\{1,2,3\},\{1,3,4\},\{1,4,5\},\{1,5,6\},\{1,6,2\}$.
$\{2,4,5\},\{3,5,6\},\{4,6,2\},\{5,2,3\},\{6,3,4\}$.
When $n=7$, the following 10 subsets satisfy the problem's requirements:
$\{1,2,3\},\{1,4,5\},\{1,6,7\},\{2,4,6\},\{2,5,7\}$,
$\{3,4,7\},\{3,5,6\},\{1,2,3\},\{1,4,5\},\{3,4,7\}$.
It can be seen that when $n=6$ or 7, the requirements of the problem are met.
When $n \geqslant 8$, the 10 three-element subsets contain a total of 30 elements. An element that appears $k$ times is called a $k$-fold element, where $2 \leqslant k \leqslant 5$. Note that there cannot be an element that appears only once, as this would lead to a 6-fold element. Let the number of $k$-fold elements be $x_{k}$, then we have
$$
\begin{array}{l}
x_{2}+x_{3}+x_{4}+x_{5} \geqslant 8, \\
2 x_{2}+3 x_{3}+4 x_{4}+5 x_{5}=30, \\
10 x_{5}+6 x_{4}+3 x_{3}+x_{2} \geqslant \mathrm{C}_{10}^{2}=45 .
\end{array}
$$
(2) - (1) $\times 2$, we get
$$
x_{3}+2 x_{4}+3 x_{5} \leqslant 14 \text {. }
$$

From this, we can deduce
$$
x_{5} \leqslant 4 \text {. }
$$
(3) - (4) $\times 3$, we get
$$
x_{2}+x_{5} \geqslant 3 \text {. }
$$

If there exists a 2-fold element, let's assume 1 is a 2-fold element. Thus, the 2 three-element subsets containing 1 can be one of the following three cases:
(i) $\{1,2,3\},\{1,2,3\}$;
(ii) $\{1,2,3\},\{1,2,4\}$;
(iii) $\{1,2,3\},\{1,4,5\}$.
Since each of the other 8 three-element subsets must have a common element with these 2 subsets, in cases (i) or (ii), it will lead to the existence of a 6-fold element, which is a contradiction; in case (iii), it will lead to the existence of a 6-fold element or at least 4 5-fold elements, i.e., $2,3,4,5$ are all 5-fold elements. This can only happen if in the other 8 three-element subsets, each contains 4 of $2,3,4,5$, and each three-element subset contains two of $\{2,3,4,5\}$, so they are
$$
(\{2,4, \times\},\{3,5, \times\}),(\{3,4, \times\},\{2,5, \times\}),
$$

and the number of the 2 three-element subsets in each group is the same. Therefore, there must be at least 4 three-element subsets in one group and the number of the two is the same. Thus, the " $x$ " marked in the subsets must be the same number. There are at least 4, i.e., at least 4-fold elements. If there is a 5-fold element, it contradicts equation (5); otherwise, there are 2 4-fold elements, which contradicts equation (4).

Assume in $n \geqslant 8$ elements, there are no 2-fold elements, then from equation (6) we know $3 \leqslant x_{5} \leqslant 4$. In this case, it can only be that among the 8 elements, there are 3 5-fold elements and 5 3-fold elements. The 5 3-fold elements appear a total of 15 times in the 10 three-element subsets. By the pigeonhole principle, there must be a three-element subset that contains at least 2 3-fold elements. This leads to this subset not being able to have a common element with the other 9, which is a contradiction.
Therefore, when $n \geqslant 8$, the requirements of the problem cannot be met.
In summary, the possible values of $n$ are $\{6,7\}$.