Fixed DFS and solution print