Give an example of a continuous function $f:R\rightarrow R$ which attains each of its values exactly three times.
Function $f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ three times