Pregunta de entrevista de Intel Corporation

Design a FSM for given question.