def path_actions(node):
    """The sequence of actions to get to this node."""
    if node is None:
        return []
    if node.parent is None:
        return []
    return path_actions(node.parent) + [node.action]