Task B-1.3. Master Zvonko cut a needle of length $30 \mathrm{~cm}$ into three parts to make a right-angled triangle from those parts. Zvonko first cut the needle into two parts, one of which was $6 \mathrm{~cm}$ shorter, and he took it as one of the legs. Determine the lengths of all three parts into which Zvonko cut the needle.