AMD interview question

FSM (Mealey and Moore). Mod N counter. An easy leetcode question