For a proper operation, a state machine (Mealy or Moore) must enter a known initial state on power-up. In the above diagram, symbols Q0, Q1,...,Q6 are names of states that you must codify. Choose an initial coded state into which the state machine can easily be forced at reset, typically the state 000. If you choose Q6 as initial state, you must assign code 000 to state Q6. Most state machines have a reset signal, synchronous or asynchronous, that is asserted during power-up.