finite automata and regex practice 550359