Hi , I'm Drishan(Hi).. new to this forum.. I need a solution to the following problem..

a simple random walk stops when any of the states is visited 3 times.What is the end state probability distribution?

prob(X(n+1)=k+1|X(n)=k)=p and prob(X(n+1)=k-1|X(n)=k)=1-p