RATT: A Thought Structure for Coherent and Correct LLM Reasoning