class TreeNode:
    def __init__(self, value = None, left = None, right = None):
        self.value = value
        self.left = left
        self.right = right
    
    def __repr__(self):
        return self.trace(padding="")
    
    def trace(self, padding=""):
        string_representation = ''
        if self.right:
            string_representation += self.right.trace(padding + "        ") + "\n" 
        
        string_representation += padding + str(self.value) + "\n"

        if self.left:
            string_representation += self.left.trace(padding + "        ")
        
        return string_representation
