def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def dfs_print(root):
        if root is None:
            return
        dfs_print(root.left)
        print(str(root.key) + ' ', end='')
        dfs_print(root.right)