def paths(some_dict, path=()):
    for key, value in getattr(some_dict, 'items', lambda: ())():
        yield path + (key,)
        yield from paths(value, path + (key,))

d = {'a': {'b': {'c': {},'d': {'e': {}}}}}
print(*paths(d), sep='\n')
