Problem 5. In the forest, there live 40 animals - foxes, wolves, hares, and badgers. Every year they organize a masquerade ball: each one wears a mask of another animal type, and they do not wear the same mask for two consecutive years. Two years ago, at the ball, there were 12 "foxes" and 28 "wolves", last year there were 15 "hares", 10 "foxes", and 15 "badgers", and this year there are 15 "hares" and 25 "foxes". Which animals are the most numerous in the forest?
Answer. The most numerous are the badgers.

Solution. Let's record the data from the problem in a table.

|  | "Wolves" | "Foxes" | "Rabbits" | "Badgers" |
| :--- | :---: | :---: | :---: | :---: |
| Two years ago | 28 | 12 |  |  |
| Last year |  | 10 | 15 | 15 |
| This year |  | 25 | 15 |  |

Let's look at the "rabbits." Over the last two years, there were 30 animals in rabbit masks. All these are different animals, as no one will wear a rabbit mask for two consecutive years. And these are not real rabbits. This means there are at least 30 non-rabbits in the forest, so the number of rabbits is no more than $40-30=10$. The same reasoning about the animals that were "foxes" for the last two years shows that the number of real foxes is no more than $40-10-25=5$. Two years ago, there were 28 "wolves" at the masquerade, and all of them were not real wolves. The number of real wolves is no more than $40-28=12$. Thus, the total number of wolves, foxes, and rabbits is no more than $12+5+10=27$. This means that the number of badgers is at least $40-27=13$, and this is the most numerous species in the forest.

Note that it is possible to choose the number of animals of each species and distribute the masks in such a way that all the conditions of the problem are satisfied. The participants in the olympiad were not required to provide such an example, but we hope that an inquisitive reader will be able to come up with it if they wish.