Reprompting: Automated Chain-of-Thought Prompt Inference Through Gibbs Sampling