G = {
    'A' : ['B','D','E'],
    'B' : ['A','C'],
    'C' : ['B','D'],
    'D' : ['A','C','E'],
    'E' : ['A','D','G','F'],
    'F' : ['E','G'],
    'G' : ['E','F','H'],
    'H' : ['G']
}

for key in G:
    start = key
    pile = []
    pile.append((start, []))

    while len(pile) > 0:
        (S, path) = pile.pop()  # Utilise pop pour dépiler
        list_nodes = [n for n in G[S] if n not in path]
        for i in list_nodes:
            if i == start:
                print([start] + path + [i])
            else:
                pile.append((i, path + [i]))