start of automata challenge