automata solved