Step 1: Divide the input text into individual statements and the final question. Output each statements.
Step 2: Create a Truth Map to keep track of the assumed truthfulness of each person mentioned in the statements. No truth values are assigned initially.
Step 3: Analyze Each Statement. For each statement, first output the statement number and the statement. identify the subject person (who makes the statement), the object person (who the statement is about), and the expected truth value (whether the object person is said to tell the truth or lie). Output the current statement under analysis along with the object person and the expected truth value for clarity.
Step 4: Update the Truth Map based on the analysis of each statement. If the statement's claim aligns with the current assumption about the object person's truthfulness, mark the subject person as truthful. Otherwise, mark them as untruthful. After each update, print the name of the person being updated, their determined truth value, and the updated truth map to track changes.
Step 5: Using the completed truth map, determine the truthfulness of the person in the final question. Output the question for reference before making the determination.
Step 6: Based on the evaluation, output "Yes" if the person in the final question is determined to tell the truth, otherwise output "No".