  For a prime number $p$ and a free profinite group $S$, let $S^{(n,p)}$ be the
$n$th term of its lower $p$-central filtration, and $S^{[n,p]}$ the
corresponding quotient. Using tools from the combinatorics of words, we
construct a canonical basis of the cohomology group
$H^2(S^{[n,p]},\mathbb{Z}/p)$, which we call the Lyndon basis, and use it to
obtain structural results on this group. We show a duality between the Lyndon
basis and canonical generators of $S^{(n,p)}/S^{(n+1,p)}$. We prove that the
cohomology group satisfies shuffle relations, which for small values of $n$
fully describe it.
