Here's a hint.
Suppose your theme is
a^x * b^y * c^z=a^y * b^z *c^x = a^z * b^x * c^y=k
Take the logarithm of the above formula (no matter what the base is) and you get
x*lg(a)+y*lg(b)+z*lg(c)=lg(k)
x*lg(b)+y*lg(c)+z*lg(a)=lg(k)
x*lg(c)+y*lg(a)+z*lg(b)=lg(k)
Solve the above equation
x=y=z=lg(k)/(lg(a)+lg(b)+lg(c))