Solution (source code)

= Solution

Order a period-three orbit as $a<b<c$. Its images produce two subintervals $I_0,I_1$ with covering relations $I_0\to I_0,I_1$ and $I_1\to I_0$. Any closed walk in this directed graph gives, by the interval-covering lemma and the <intermediate value theorem>, a fixed point of the corresponding iterate. Primitive closed walks of every length exist, giving an orbit of every positive period; this is the period-three case of <Sharkovsky theorem>.