nfa ending with ab or ba