t = {   "contents" : 3,
        "left" : {  "contents" : 1,
                    "left" : None,
                    "right" : { "contents" : 2,
                                "left" : None,
                                "right" : None } },
        "right" : { "contents" : 5,
                    "left" : {  "contents" : 4,
                                "left" : None,
                                "right" : None },
                    "right" : { "contents" : 8,
                                "left" : {  "contents" : 6,
                                            "left" : None,
                                            "right" : None },
                                "right" : None } } }

def search(t, target):
    print("IN:", t)
    if t == None:
        return False
    elif t["contents"] == target:
        return True
    else:
        left = search(t["left"], target)
        right = search(t["right"], target)
        return left or right

###
    
def bsearch(t, target):
    print("IN:", t)
    if t == None:
        return False
    elif t["contents"] == target:
        return True
    elif target < t["contents"]:
        return bsearch(t["left"], target)
    else:
        return bsearch(t["right"], target)
