c got ac. d wa should use bfs instead of dfs. e several wa, got ac after match