NVIDIA interview question

Design an FSM to do module 3