solve 044 and 045
NA_045: DFS implementation of 045, but with maximum recursion depth problem