codeforces problem 002b - dfs with backtracking - slow
codeforces problem 002b - dfs with backtracking - slow #2