public TreeNode lift(long x, final TreeNode t)
    {
        if (t.right == null) {
            x = t.value;
            return t.left;
        } else {
            t.right = lift(x, t.right);
            return t;
        }
    }