<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_list(cls, values):
 """Construct a tree from a list with paths."""

        self = cls()
        for value in values:
            self.add(value)
        return self