Synopsys interview question

State machine using provided graph