Group theory intricate problem This is Miklos Schweitzer 2009 Problem 6. It's a group theory problem hidden in a complicated language. 

A set system $(S,L)$ is called a Steiner triple system if $L \neq \emptyset$, any pair $x,y \in S, x \neq y$ of points lie on a unique line $\ell \in L$, and every line $\ell \in L$ contains exactly three points. Let $(S,L)$ be a Steiner triple system, and let us denote by $xy$ the third point on a line determined by the points $x \neq y$. Let $A$ be a group whose  factor by its center $C(A)$ is of prime power order. Let $f,h:S \to A$ be maps, such that $C(A)$ contains the range of $f$, and the range of $h$ generates $A$. Show that if 
  $$ f(x)=h(x)h(y)h(x)h(xy)$$ holds for all pairs of points $x \neq y$, then $A$ is commutative and there exists an element $k \in A$ such that $$ f(x)= k h(x),\ \forall x \in S $$

Here is what I've got:


*

*Because the image of $h$ generates $A$, for $A$ to be commutative is enough to prove that $h(x)h(y)=h(y)h(x)$ for every $x,y \in S$.

*For the last identity to be true (if we have proved the commutativity) it is enough to have that the product $h(x)h(y)h(xy)=k$ for every $x \neq y$.

*$h(y)h(x)h(xy)=h(xy)h(x)h(y)$

*I should use somewhere the fact that the factor $A /C(A)$ has prime power order.

Let $g:S\rightarrow A$ be defined as $g(x) = h(x)^{-1} f(x)$. 
Now, if $\{x,y,z\}\in L$, then $g(y) = h(z)g(x)h(z)^{-1}$.  This means that the image of $g$ is closed under conjugation by elements of $A$ since $A$ is generated by the image of $h.$  
Also, since this formula does not depend on the order of $x,y,z$, it means that $g(x)=h(z)g(y)h(z)^{-1}$. In particular, then $h(z)^2$ commutes with $g(x)$ for all $x$.
But since $f(x)$ is in the center of $A$, that means that $h(z)^2$ commutes with $h(x)$ for all $x, z\in S$.  Hence $h(z)^2$ commutes with all of $A$ - that is $h(z)^2\in C(A)$, so $A/C(A)$ is generated by elements of order $2$, so by the condition of the problem, $A/C(A)$ must be of order $2^n$ for some $n$.
Now, since $g(x)=h(y)h(x)h(z) = h(z)h(x)h(y)$, we can see that:
$$g(x)^2 = h(y)h(x)h(z)h(z)h(x)h(y) = h(x)^2 h(y)^2 h(z)^2$$
Therefore, $g(x)^2 = g(y)^2 = g(z)^2$, and in particular, for all $x,y \in S$, $g(x)^2 = g(y)^2$. So there is some $K\in C(A)$ such that $\forall x\in S, g(x)^2=K$.
There are lots of things that can be concluded from knowing that $h(x)^2\in C(A)$.  For example, that $f(x)f(y) {f(z)}^{-1}= h(x)^2 h(y)^2$.  That can be used to show that $f(x)f(y)f(z) = h(x)^4h(y)^4h(z)^4 = K^2$.
Not sure where to go from here.
