Suppose for two random variables $X$ and $Y$ we have $X\perp\!\!\!\perp Y$ and also assume that three random variables $X$, $Y$ and $Z$ form the following Markov chain: $X\to Z\to Y$.
Do these two assumptions imply that $Z$ is a constant?
I know that this is true that if $X\perp\!\!\!\perp Y$ then we can have the following trivial Markov chain: $X\to c\to Y$ where $c$ is a constant.
If $(X,Z,Y)$ is independent, then $(X,Y)$ is independent and $(X,Z,Y)$ is a Markov chain. Hence $Z$ can be nondegenerate.