Command(s) to turn a functional continued fraction into P[x]/Q[x]

I have not figured out the right command sequence to turn a Continued fraction of rational short polynomials into one equivalent P[x]/Q[x] polynomial

Here is one truncated example:

A1/(B1 n - A2/((c2 + B2 n) -
A3/((c3 + B3 n) - A4/((c4 + B4 n) - A5/(c5 + B5 n)))))

I can do it manually with cutting and pasting but isn’t there a command or two that could do it? Nothing about Simplify seems to do it.
After I do it manually I can expand/collect and see the coefficients for each power but I want to look deeper and not make manual errors. I already know the generating function for A[k], B[k] and c[k].

Any help appreciated.
Thank you -
Curious in Seattle

is this what you mean?

r = a1/(b1 x - a2/((c2 + b2 x) - a3/((c3 + b3 x) - a4/((c4 + b4 x) - a5/(c5 + b5 x)))));
r = Simplify@Factor[r]

Yes that should do it - thank you very much. I can expand and collect from that.
I appreciate it.