Class for NFA - DFA need to fix the bugs.