8. For a natural number $a, S(a)$ denotes the sum of the digits of $a$ (for example, $S(123)=1+2+3=6$). If a natural number $n$ has all distinct digits, and $S(3 n)=3 S(n)$, then the maximum value of $n$ is $\qquad$
【Analysis】That is, $S(n+n+n)=S(n)+S(n)+S(n)$, the sum of the digits of the sum equals the sum of the sums of the digits, which means there should be no carry-over in the process of $n+n+n$. Therefore, the digits of $n$ can only be $0, 1, 2, 3$. Since all digits must be different, the largest possible value for $n$ is 3210.