Let $G$ be a group, and for each ordered $n$ tuple $(g_1,...g_n)$ of elements of $G$, consider the function $f_n$ that outputs the number of permutations $\sigma\in S_n$ for which $g_{\sigma(1)}g_{\sigma(2)}...g_{\sigma(n)}=e$.
Is the group determined up to isomorphism by these functions $f_n$?
More precisely, if we have a set $G$, and two collections of functions $f^1_n,f^2_n$ on $n$ tuples of elements of $G$, such that there exists group structures $\mu_1,\mu_2:G\times G\rightarrow G$, $\epsilon_1,\epsilon_2:\ast\rightarrow G$ on $G$ giving rise to $f^i_n$ in the manner described above, is there a bijection $X\rightarrow X$ which identifies the groups $(\mu_1,\epsilon_1)$, and $(\mu_2,\epsilon_2)$?
Note that we can recover identity from $f_1$, inverses from $f_2$, and by looking at $3$ tuples, we can partially deduce the group law, in that we can say when $gh=k$ or $hg=k$ holds for any $g,h,k\in G$. So in particular, this has an affirmative answer when $G$ is abelian. For the general case, I wasn't able to find a similarly elementary argument.