I am trying to understand the proof of the following statement:
Let $\Gamma=\{g_1,\cdots,g_n\}$ be a group. Define a digraph $G$ by joining $g_i$ to $g_j$ by an edge of color $k$ if $g_ig_j^{-1}=g_k$. The automorphism group of the resulting colored digraph is isomorphic to $\Gamma$.
The proof in the book, constructs a map $\phi:\Gamma\to Aut(G)$ defined by $\phi(g)=f_g$ where $f_g\in Aut(G)$ such that $f_g(g_i)=g_ig$. Then it shows that $\phi$ is bijective.
The next sentence in the book (and the sentence I have a problem with) is:
Since it is easy to see that the multiplication of elements of $\Gamma$ is the same as multiplication between the corresponding automorphisms of $G$, we conclude that the automorphism group of $G$ is isomorphic with $\Gamma$.
Obviously the meaning here is that $\phi$ is a homomorphism. However, I don't understand why $\phi(g_ig_j)=\phi(g_i)\circ\phi(g_j)$. Indeed, $f_{g_ig_j}(g_k)=g_kg_ig_j\ne g_kg_jg_i=f_{g_i}\circ f_{g_j}(g_k)$, and so $\phi(g_ig_j)\ne\phi(g_i)\circ\phi(g_j)$, in general.
Can someone explain please? Thanks.