12. (40 points) Five boys played a word game: each of them wrote down 7 different words. It turned out that each boy had exactly 2 words that were not found in any of the other boys' lists. What is the maximum number of different words that the boys could have written in total?
Answer: 22.

Solution: In total, $5 \times 7=35$ words were written. Since each boy wrote exactly 2 words that did not appear in any of the other boys' writings, there were a total of $5 \times 2=10$ such unique words. From the remaining 25 words (repeated), each was written at least twice. Therefore, there are no more than $\left[\frac{25}{2}\right]=12$ of them, and the total number of words does not exceed $10+12=22$.

Example of the distribution of repeated words $\left(s_{i}\right)$ :

|  | $s_{1}$ | $s_{2}$ | $s_{3}$ | $s_{4}$ | $s_{5}$ | $s_{6}$ | $s_{7}$ | $s_{8}$ | $s_{9}$ | $s_{10}$ | $s_{11}$ | $s_{12}$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $M_{1}$ | + | + | + | + | + |  |  |  |  |  |  |  |
| $M_{2}$ | + |  |  |  | + | + | + | + |  |  |  |  |
| $M_{3}$ |  | + |  |  |  | + |  |  | + | + |  | + |
| $M_{4}$ |  |  | + |  |  |  | + |  | + |  | + | + |
| $M_{5}$ |  |  |  | + |  |  |  | + |  | + | + | + |