Pregunta de entrevista de Akeyless Security

Given a tree of path segments forming a secret, write a function that lists all possible secrets.