It is not clear to me (without seeing your code) what your current issue is.
Glancing through the paper, I see (for example in fig. 1):
(arbitrary objects) $c_1,\dots, c_v$ and $s_1,\dots, s_v$
hashes of these objects, which are written $hc_i = H(c_i)$ and $hs_i = H(s_i)$ (up to a permutation applied to the $s_i$).
All of the remaining operations are in ...