Introduction to Formal Languages and Automata