Facilitating Long Context Understanding via Supervised Chain-of-Thought Reasoning