dfs, graph class, stack class