  Using recurrent relation and analog of the Lagrange inversion theorem, we
obtain an explicit formula for the number of tree-type diagrams assembled from
$k$ oriented labeled $q$-regular chains. Using a version of the Pr$\"u$fer code
for Cayley trees, we generalize our result to the case when the chains are not
necessarily regular.
