Matrix of transition probabilities for any time-inhomogeneous multistate model with finite state space