Let $w(a,b)$ be a word in two letter alphabet. Let $$A=\left(\begin{array}{lll}x_1 & x_2 & x_3\\\ x_4 &x_5 & x_6\\\ x_7 & x_8 & x_9\end{array}\right), B=\left(\begin{array}{lll}y_1 & y_2 & y_3\\\ y_4 &y_5 & y_6\\\ y_7 & y_8 & y_9\end{array}\right)$$ where $x_i,y_i$ are commuting variables. Let $f_w=\mathrm{trace}(w(A,B))$, a polynomial in 18 variables. 

<b> Question. </b> Is it possible to reconstruct $w$ up to a cyclic shift from $f_w$. 

<p> Note that there exists a polynomial in one variable that encodes $w$: $x^{p_1}+...+x^{p_s}$ where $p_1,...,p_s$ are the places where $a$ occurs in $w$. Also note that for 2 by 2 matrices the answer is "no". For example if $w=abbab$ and $w'=babba$, then $f_w=f_{w'}$ for 2 by 2 matrices.