6. Let set $A=\{1,2,3,4,5,6\}$, and a one-to-one mapping $f: A \rightarrow A$ satisfies that for any $x \in A$, $f(f(f(x)))$ $=x$. Then the number of mappings $f$ that satisfy the above condition is ( ).
(A) 40
(B) 41
(C) 80
(D) 81
6.D.

If there exists $x \in A$ such that $f(f(x))=x, f(x) \neq x$, then $f(f(f(x)))=f(x) \neq x$, which contradicts the given condition. Therefore, for any $x \in A$, either $f(x)=x$, or $f(x)=x_{1}, f(x_{1})=x_{2}, f(x_{2})=x$, and $x, x_{1}, x_{2}$ are distinct. Hence, there are only the following three scenarios:
(1) For any $x \in A, f(x)=x$, there is only 1 such $f$;
(2) $f$ contains a cycle $a \rightarrow b \rightarrow c \rightarrow a$, and for other elements $x=a^{\prime}, b^{\prime}, c^{\prime}$, $f(x)=x$, there are $\mathrm{C}_{6}^{3}(3-1)!=40$ such $f$;
(3) $f$ contains two cycles $a \rightarrow b \rightarrow c \rightarrow a$ and $a^{\prime} \rightarrow b^{\prime} \rightarrow c^{\prime} \rightarrow a^{\prime}$, there are
$$
\frac{\mathrm{C}_{6}^{3} \mathrm{C}_{3}^{3}}{2!}(3-1)!(3-1)!=40 \text{ such } f.
$$

Therefore, the total number of mappings $f$ that satisfy the condition is 81.