Apple Interview Question

write HDL code for a FSM