text: class Tree:
      def __init__(self, tree_data) -> None:
          super().__init__()
          self.root = Node(tree_data[0])
          for data in tree_data[1:]:
              self.root.add_child(data)
  
      def __repr__(self) -> str:
          s = [[] for i in range(15)]
  
          def output(node, level):
              s[level].append(node.val)
              if node.left is not None:
                  output(node.left, level + 1)
              if node.right is not None:
                  output(node.right, level + 1)
  
          output(self.root, 0)
          return "\n".join([" ".join([str(v) for v in t]) for t in s])
  
  
  class Node:
      def __init__(self, val) -> None:
          super().__init__()
          self.val = val
          self.left = None
          self.right = None
  
      def add_child(self, child_val):
          if child_val < self.val:
              if self.left is None:
                  self.left = Node(child_val)
              else:
                  self.left.add_child(child_val)
          else:
              if self.right is None:
                  self.right = Node(child_val)
              else:
                  self.right.add_child(child_val)
  
  
  if __name__ == "__main__":
      tree_data = [6, 5, 7, 3, 8, 4, 6.5, 1, 10]
      tree = Tree(tree_data)
      print(tree)