#P1597. Pascal Variable Assignment Evaluation
Pascal Variable Assignment Evaluation
Pascal Variable Assignment Evaluation
You are given a string representing Pascal code of length at most . The code contains only assignment statements using three variables , , and . Each assignment statement is of the form [variable]:=[variable or one-digit integer];
. Variables that have not been assigned any value are considered to be . Your task is to simulate the execution of the code and output the final values of , , and .
inputFormat
The input consists of a single line containing a string with the Pascal code as described. The length of the string does not exceed 255 characters.
outputFormat
Output the values of a
, b
, and c
separated by a space.
sample
a:=1;
1 0 0