# How Restricted Boltzman Machine (RBM) generates hand-written digit?

I am reading RBMs from this paper. In Fig1 they show an example of generating hand-written digit using RBMs. This is the figure they are showing:

In the learning step first we sample $$h$$ from $$h \sim P(h|v)$$ and then reconstruct $$v$$ from $$v \sim P(v|h)$$. Now in the generating step they are sampling $$v$$ from $$v \sim P(v|h)$$. My question is, in generating step if we do not sample $$h$$ from $$h \sim P(h|v)$$ how can we get $$P(v|h)$$?