The question is similar to exercise 5.5.1 in Probability: Theory and Examples 5th edition by Durrett.
Let $\xi_1, \xi_2, ...$ be i.i.d $\in$ $\{1, 2, ..., N\}$ and taking each value with probability $\frac{1}{N}$. Consider the range of values up to time n, $X_n=\{\xi_1,\xi_2, ..., \xi_n\}|$. Show that $X_n$ is a Markov chain. How much time is expected for $X_n$ to be absorbed at M?