At the very beginning, I will refer to this post:How to prove the cyclic property of the trace? which is a starting point for my question:
If cyclic permutations don't change $tr(A_1\cdot A_2\ldots A_n),$ prove that $n\;\text{factors}$ give at most $(n-1)!$ different traces.
My attempt: $$\text{cyclic permutation}\iff \text{initial trace}$$ $$\implies\text{number of non-cyclic permutations}=?$$ By the assumption and the proof I've seen on the link above: $$tr(A_1\cdot\underbrace{ A_2\ldots A_{n-1}}_{X} A_n)=tr(A_n\cdot A_1\cdot X)$$ $X$ consists of $(n-2)$ factors $\implies$ $(n-2)!-1$ non-cyclic permutations 'in' $X$, but I haven't achieved anything this way.
Then I considered derangements, but it wasn' t a very clear idea because I didn't know what to do with the order of factors with consecutive indexes and then I thought of a proof by induction, but after proving the base it didn't seem sufficient either.