Reasoning to Learn from Latent Thoughts