5. Nif-Nif, Naf-Naf, Nuf-Nuf, and the Wolf decided to weigh themselves. It turned out that the Wolf weighs more than Nif-Nif; Nuf-Nuf and Nif-Nif weigh more than the Wolf and Naf-Naf; Nuf-Nuf and Naf-Naf weigh as much as the Wolf and Nif-Nif. Arrange the piglets and the Wolf in descending order of weight. (15 points)
Solution.

Let the masses of the Wolf be $a$, Nif-Nif be $b$, Naf-Naf be $c$, and Nuf-Nuf be $d$. From the condition, we get $a>b(1)$,

$$
d+b>a+c(2), d+c=a+b(3)
$$

From conditions (1) and (2), it follows that $a+c>b+c$, so $d>c$. From conditions (2) and (3), we get: $2 d+b+c>2 a+c+b$, then $d>a$. If $d>a$, then from condition (3) it follows that $b>c$. Therefore, it is known that $d>a, a>b, b>c$. The satisfaction of all inequalities is possible if

$$
d>a>b>c
$$

Thus, Nuf-Nuf is the heaviest, slightly lighter is the Wolf, even lighter is Nif-Nif, and the lightest is Naf-Naf.