P1597 Statement Parsing

Background

No background.

Description

A PASCAL code string of length not exceeding $255$, containing only the three variables a, b, c and only assignment statements. The right-hand side of an assignment can only be a single-digit number or a variable. Each assignment statement has the format "[variable] := [variable or single-digit integer];". Unassigned variables have value $0$. Output the values of a, b, c.

Input Format

A string of PASCAL code that conforms to the above constraints, using only variables a, b, c and only assignment statements, where the right-hand side is either a single-digit integer or a variable. Unassigned variables have value $0$.

Output Format

Output the final values of a, b, c.

Explanation/Hint

The length of the input PASCAL code does not exceed $255$. Translated by ChatGPT 5