Let $R$ be a commutative Noetherian ring and $a_1,\ldots,a_n,b_1,\ldots,b_n\in R$ be elements such that the heights of the ideals $A_m:=(a_1,\ldots,a_m)$ and $B_m=(b_1,\ldots,b_m)$ are equal to $m$ for each $m\in\{1,\ldots,n\}$. I want to find elements $c_1,\ldots,c_n\in R$ so that $c_m\in A_m\cap B_m$ and the height of the ideal $(c_1,\ldots,c_m)$ is equal to $m$ for each $m\in\{1,\ldots,n\}$.
Note that we can choose $c_1=a_1b_1$ since if $P$ is any minimal prime ideal over $(c_1)$ then $a_1\in P$ or $b_1\in P$ which means $A_1\subseteq P$ or $B_1\subseteq P$ so that the height of $P$ is at least $1$.
How do we choose $c_2,\ldots,c_n$?