Five. (30 points) Let the set
$$
X=\{(a, b, c) \mid a, b, c \in \mathbf{Z}\},
$$
and $f$ be a mapping from $X$ to $X$ such that
$$
f(a, b, c)=(a+b+c, ab+bc+ca, abc) .
$$

Find all triples $(a, b, c)$ such that
$$
f(f(a, b, c))=(a, b, c) .
$$
Because $f(a, b, c)=(a+b+c, a b+b c+c a, a b c)$, so,
$$
\begin{array}{l}
f(f(a, b, c)) \\
=f(a+b+c, a b+b c+c a, a b c) .
\end{array}
$$

By $f(f(a, b, c))=(a, b, c)$, we get
$$
(a+b+c)+(a b+b c+c a)+a b c=a,
$$

which means $(1+a)(1+b)(1+c)=1+a$.
Thus, $1+a=0$ or $(1+b)(1+c)=1$.
(1) If $1+a=0$, i.e., $a=-1$, then
$$
\begin{array}{l}
f(f(-1, b, c)) \\
=f(b+c-1, b c-(b+c),-b c) .
\end{array}
$$

By $f(f(-1, b, c))=(-1, b, c)$, we get
$$
(b+c-1)[b c-(b+c)](-b c)=c .
$$

Thus, $c=0$ or
$$
b(b+c-1)[b c-(b+c)]=-1 \text{. }
$$

When $c=0$,
$$
\begin{array}{l}
f(f(-1, b, 0))=f(b-1,-b, 0) \\
=(-1,-b(b-1), 0) .
\end{array}
$$

By $f(f(-1, b, 0))=(-1, b, 0)$, we get
$-b(b-1)=b$, i.e., $b=0$.
At this time, $f(f(-1,0,0))=f(-1,0,0)=$ $(-1,0,0)$, which meets the requirement.

When $b(b+c-1)[b c-(b+c)]=-1$, by $b, c$ being integers, we know $b= \pm 1$.
If $b=1$, then $c=1$. At this time,
$$
\begin{array}{l}
f(f(-1,1,1))=f(1,-1,-1) \\
=(-1,-1,1) \neq(-1,1,1),
\end{array}
$$

which does not meet the requirement.
If $b=-1$, then $c=1$. At this time,
$$
\begin{array}{l}
f(f(-1,-1,1))=f(-1,-1,1) \\
=(-1,-1,1),
\end{array}
$$

which meets the requirement.
Therefore, $(-1,0,0)$ and $(-1,-1,1)$ are two solutions that meet the requirement.
(2) If $(1+b)(1+c)=1$, then by $b, c$ being integers, we get
$$
\left\{\begin{array}{l}
1 + b = 1, \\
1 + c = 1
\end{array} \text{ or } \left\{\begin{array}{l}
1+b=-1, \\
1+c=-1,
\end{array}\right.\right.
$$

i.e., $b=c=0$ or $b=c=-2$.
When $b=c=0$,
$$
f(f(a, 0,0))=f(a, 0,0)=(a, 0,0) \text{, }
$$

which meets the requirement.
When $b=c=-2$,
$$
f(f(a,-2,-2))=f(a-4,4-4 a, 4 a) \text{. }
$$

By $f(f(a,-2,-2))=(a,-2,-2)$, we get
$$
(a-4)(4-4 a)+4 a(4-4 a)+4 a(a-4)=-2 \text{, }
$$

i.e., $2[(a-4)(1-a)+a(4-4 a)+a(a-4)]=-1$.
The left side of the above equation is even, while the right side is odd, so there is no integer solution.
In summary, the required triples are $(-1,-1,1)$ and $(a, 0,0)(a \in \mathbf{Z})$.