# Expanding conditional probability for Gibbs sampling with many parameters

I'm trying to use Gibbs sampling to get the following target distribution:

$$p(a,b,c \lvert x, z)$$

Where $$z = f(x,a,b,c)$$ and the rest are independent. I know the following conditional probabilities and can sample from them:

$$p(a\lvert x, z, b, c), \, p(b\lvert x, z, a, c), \, p(c\lvert x, z, b, a)$$

My question is how to express the target distribution I need using the ones above.

$$p(a,b,c \lvert x, z) = \frac{p(a,b,c,x,z)}{p(x,z)}$$

But I'm not sure how to continue (or if it's the right direction)

Definition: Let $$(Y_1, Y_2, \ldots, Y_p) \sim g(y_1,\ldots,y_p)$$, where $$g^{(i)}$$ denotes the marginal distribution of $$Y_i$$. If $$g^{(i)}(y_i)> 0$$ for every $$i=1, \ldots, p$$, implies that $$g(y_1,\ldots,y_p) > 0$$ then $$g$$ is said to satisfy the positivity condition.
Theorem (Besag, 1974) Under the above positivity condition, the joint distribution $$g$$ satisfies $$g(y_1,\ldots,y_p) \propto \prod_{j=1}^p \; {g_{\ell_j}(y_{\ell_j}|y_{\ell_1}, \ldots,y_{\ell_{j-1}},y_{\ell_{j+1}}^\prime,\ldots,y_{\ell_p}^\prime) \over g_{\ell_j}(y_{\ell_j}^\prime|y_{\ell_1},\ldots,y_{\ell_{j-1}}, y_{\ell_{j+1}}^\prime,\ldots,y_{\ell_p}^\prime)}$$ for every permutation $$\ell$$ on $$\{1,2,\ldots,p\}$$ and every $$y' \in \mathfrak Y$$.
The conditioning on $$(x,z)$$ mentioned in the question is irrelevant in that case, since every distribution appearing above is then conditional on $$(x,z)$$.