Consider a particle performing a random walk on a straight line. The state space for the random walk is $I=\{1, 2, \ldots, m\}$, and the probability rule for the walk is that the probability of moving from point $i$ to $i+1$ in one step is $p$, and the probability of moving to point $i-1$ is $q$, where $p + q = 1$, $1 \leq i \leq m - 1$. The states 0 and $m$ are absorbing states. Find its transition probability matrix.

Options:
A. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{1}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{1}}} & {{{p}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{1}}} & {{{q}}} & {{{0}}} & {{{p}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
B. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{q}}} & {{{p}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
C. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{p}}} & {{{q}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
D. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{0}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{0}}} & {{{p}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{p}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
E. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ {{{0}}} & {{{q}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{p}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{q}}} & {{{p}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
F. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{q}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{p}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{q}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{p}}} & {{{1}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
G. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{p}}} & {{{1}}} & {{{q}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{p}}} & {{{1}}} & {{{q}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{1}}} & {{{p}}} & {{{0}}} & {{{q}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
H. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{p}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{p}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{p}}} & {{{0}}} & {{{q}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
I. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{p}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{q}}} & {{{p}}} & {{{q}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{q}}} & {{{p}}} & {{{q}}} & {{{p}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
J. $$
P=\left[ \begin{matrix} {{{1}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{q}}} & {{{0}}} & {{{0}}} & {{{p}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{q}}} & {{{0}}} & {{{p}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} \\ {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} & {{{\vdots}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{q}}} & {{{0}}} \\ {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{\cdots}}} & {{{0}}} & {{{0}}} & {{{0}}} & {{{1}}} \\ \end{matrix} \right]
$$
Answer: D