
Triangle $ABC_0$ has a right angle at $C_0$. Its side lengths are pairwise relatively prime positive integers, and its perimeter is $p$. Let $C_1$ be the foot of the altitude to $\overline{AB}$, and for $n \geq 2$, let $C_n$ be the foot of the altitude to $\overline{C_{n-2}B}$ in $\triangle C_{n-2}C_{n-1}B$. The sum $\sum\limits_{n=2}^\infty C_{n-2}C_{n-1} = 6p$. Find $p$.

Let's think step by step and output the final answer within \boxed{}.
user