Wrote the nfa -> dfs method.