For a prime number p and a free profinite group S on the basis X, let
$S_{\left (n,p\right )}$,
$n=1,2,\dotsc ,$ be the p-Zassenhaus filtration of S. For
$p>n$, we give a word-combinatorial description of the cohomology group
$H^2\left (S/S_{\left (n,p\right )},\mathbb {Z}/p\right )$ in terms of the shuffle algebra on X. We give a natural linear basis for this cohomology group, which is constructed by means of unitriangular representations arising from Lyndon words.