  In the recent paper arXiv:0710.4085 was shown that any solution of "the
polynomial moment problem", which asks to describe polynomials Q orthogonal to
all powers of a given polynomial P on a segment, may be obtained as a sum of
some "reducible" solutions related to different decompositions of P into a
composition of two polynomials of lesser degrees. However, the methods of
arXiv:0710.4085 do not permit to estimate the number of necessary reducible
solutions or to describe them explicitly. In this paper we provide a
description of the polynomial solutions of the functional equation
P=P_1(W_1)=P_2(W_2)=...=P_r(W_r), and on this base describe solutions of the
polynomial moment problem in an explicit form suitable for applications. With
respect to the previous version a more general form of the generalized "secon
Ritt theorem" is proved and the proof is considerably simplified. Besides, a
missed case in Theorem 1.2 was added and the proof is corrected.
