Iterative Deepening DFS

Plain DFS causes runtime error due to stack overflow.