# Educational CoT-style trace. This prints a brief, task-specific rationale,
# not private internal reasoning from a language model.
def solve(question):
    q = question.lower()
    print("Question:", question)
    if "add" in q:
        nums = [int(x) for x in q.replace("+", " ").split() if x.isdigit()]
        if len(nums) >= 2:
            print("Steps: identify the numbers -> add them -> report result")
            print("Answer:", sum(nums))
            return
    if "capital of india" in q:
        print("Steps: identify the country -> retrieve its capital")
        print("Answer: New Delhi")
    else:
        print("Steps: identify the task -> choose a suitable method")
        print("Answer: This demo supports simple addition and India's capital.")

print("=== Chain of Thought Demo ===")
solve(input("Enter a question: "))
