Let $X(n)_{n \geq 0}$ be a homogeneous Markov chain with state space $S$. Define $$p_{ij}(n):= \mathbb{P}( X(n+m)=j|X(m)=i),$$ where $i, j \in S$, $n \geq 1$, and $m \geq 0$. Let $d(i)$ be the period of state $i \in S$, i.e., $$d(i):=\gcd\{n \geq 1: p_{ii}(n)>0 \}.$$
I want to prove that $d(i)=d(j)$ for two states $i, j \in S$ which intercommunicate.
I know how to prove that two states in the same communicating class of a Markov chain have the same period (see Show that two states in the same communicating class of a Markov chain must have the same period), but the fact that $X(n)_{n \geq 0}$ is homogeneous is not used, so I am not sure how to prove this. Thank you for your help.