Inverse Transition Learning: Learning Dynamics from Demonstrations