Apple interview question

write HDL code for a FSM