Pregunta de entrevista de Huawei Technologies

Write a function that returns all the ancestors of a node.