Switched to breadth first search for finding hints