Balik trid pro tridy urcene pro algoritmy typu DFS.