Formal Languages and Automata