Let $x$ be a $p$-letter word, $f^{n}(x)=x \implies x$ must be a 'boring' word Let $D$ be the set of permutation of $p$-letter word, where $p$ is prime number. And let $f$ be the function $f:D \rightarrow D$ that moves the last letter to the front. For example, if $p=7$,
$$ f(abcdefgh) = habcdefg  $$
We may call a word $x$ is a 'boring' word, only if $f(x) = x$. Notice that there exist only 26 boring words: all $a$s $\underbrace{aa...a}_{p}$, all $b$s, ..., and all $z$s $\underbrace{zz...z}_{p}$.
Proof that if $f^{n}(x) = x$, where $1 \le n \le p-1$, then $x$ is a 'boring' word.

My attempt, if $n=1$ is clear. Now let $p>2$, $n=2$ and $f^{2}(x)=x$. Define $\alpha_{i}$ to be the letter at position $i$th in $x$.
$$ x = \alpha_{1}, \alpha_{2}, ..., \alpha_{p} $$
$$ \implies f(x) = \alpha_{p}, \alpha_{1} , ..., \alpha_{p-1} $$
$$ \implies f^{2}(x) = \alpha_{p-1} , \alpha_{p}, ..., \alpha_{p-2} $$
This means that
$$ \alpha_{p} = \alpha_{p-2} = \alpha_{p-4} = ... = \alpha_{1} $$
but
$$ \alpha_{1} = \alpha_{p-1} = \alpha_{p-3} = ... = \alpha_{2} $$
so all the letters must be the same, which means a 'boring' word.
Now if $n > 2$ and $f^{n}(x)=x$. Notice that we always have $p = qn + r$, where $0<r<n$ is the remainder, then
$$ \alpha_{p} = \alpha_{p-n} =  ... = \alpha_{(p -qn) = r} $$
how to continue..?
 A: First observe that $f^p(x) = x$ for all $x\in D$, i.e. $f^p = \mathrm{id}_D$. In particular, $f$ is invertible. Furthermore, notice that if $f^n(x) = x$ for some $x$, then $f^{kn}(x) = x$, for any integer $k$.
Now, let $1\leq n < p$ and $x$ be such that $f^n(x) = x$. Since $p$ is prime, $n$ and $p$ are relatively prime. By the Bézout's identity, there exist integers $a$ and $b$ such that $an+bp = 1$. Finally,
$$f(x) = f^{an+bp}(x) = (f^{an}\circ f^{bp})(x) = x.$$
Thus, $x$ is boring.
A: Let $x=a_0\cdots a_{p-1}$ so $f^n(x)=a_{p-n}\cdots a_{p-1}a_0\cdots a_{p-n-1}$. By Lagrange we have $\langle p-n\rangle=\Bbb Z_p^+$ whenever $0<n<p$ and since $f^n(x)=x$ the result follows.
A: Let us look at a specific example where $p=13$, $n=4$, then
$\alpha_{13} = \alpha_{9} = \alpha_{5} = \alpha_{1}$.
Then $\alpha_{1} = \alpha_{(1+13)-4} = \alpha_{(1+13)-2 \cdot 4} = ... $.
So basically
$$ \alpha_{13} = \alpha_{(13 - kn) \mod 13} $$
for non-negative integer $k$.
And since $\gcd(n,13)=1$ then $ lcm (n,13)=13n$, this means
$$ 13 \bmod 13, \: 13-(4) \bmod 13, \: 13-(2 \cdot 4) \bmod 13, ..., \: 13-(12 \cdot 4) \bmod 13 $$
are all different, and then it starts again at $13 - (13 \cdot 4) \equiv 13 \bmod 13$.
Proof: assume that there are $1< k_{1}, k_{2} < 13$ with $k_{1} \ne k_{2}$, such that
$$ 13 - (k_{1}n) \equiv 13 - (k_{2}n) \bmod 13 $$
then $(k_{2} - k_{1})n$ is divisible by $13$ which is impossible because the smallest multiple of $n=4$ that is divisible by $13$ is $13 \cdot 4$. This means that $(13-kn)$ must be congruent with all $1,2,...,12 \bmod 13$. This means $\alpha_{1}=\alpha_{2}=...=\alpha_{13}$.
Now for general prime $p > 2$, and $1 \le n \le p-1$, then we will also have $lcm(p,n)=np$, so we will end up with $\alpha_{1}=\alpha_{2}=...=\alpha_{p}$.
