Edit: Cross-posted to MathOverflow here (and resolved).
Let $G=\{g_1,g_2,...,g_n\}$ be a group with $e=g_1$ and $n$ is odd,
Set $$a_1=g_1$$ $$a_2=g_1g_2$$ $$a_3=g_1g_2g_3$$ $$a_n=g_1g_2...g_n$$
I am looking for example that all $a_i$ are different from each other i.e. $G=\{a_1,a_2,...,a_n\}$. By the way it is clear that $a_i\neq a_{i+1}$.
This question was cross-posted on MathOverflow where it was answered by Joni Teräväinen. I have reproduced the answer below.