parent = {}


def DFS_Visit(s, graph):
    if s in graph.keys():
        for v in graph[s]:
            if v not in parent:
                parent[v] = s
                DFS_Visit(v, graph)


def DFS(v, graph):
    for s in graph.keys():
        if s not in parent:
            parent[s] = None
            DFS_Visit(s, graph)
    return parent

f0d1bb1eac5ae9c48c935b417c8d1536987d34bd
<mask token>

<mask token>


def DFS_Visit(s, graph):
    if s in graph.keys():
        for v in graph[s]:
            if v not in parent:
                parent[v] = s
                DFS_Visit(v, graph)


<mask token>

<mask token>


def DFS_Visit(s, graph):
    if s in graph.keys():
        for v in graph[s]:
            if v not in parent:
                parent[v] = s
                DFS_Visit(v, graph)


def DFS(v, graph):
    for s in graph.keys():
        if s not in parent:
            parent[s] = None
            DFS_Visit(s, graph)
    return parent

parent = {}


def DFS_Visit(s, graph):
    if s in graph.keys():
        for v in graph[s]:
            if v not in parent:
                parent[v] = s
                DFS_Visit(v, graph)


def DFS(v, graph):
    for s in graph.keys():
        if s not in parent:
            parent[s] = None
            DFS_Visit(s, graph)
    return parent
