def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def insert(root, key):
    left, right = split(root, key)
    return merge(merge(left, Treap(key)), right)