function binary_search(tbl, key, imin, imax)
    if imax < imin then
        return imin
    end
    
    local imid = imin + math.floor((imax - imin)/2)
    if tbl[imid] > key then
        return binary_search(tbl, key, imin, imid - 1)
    elseif tbl[imid] < key then
        return binary_search(tbl, key, imid + 1, imax)
    else
        return imid
    end
end

function main()
    local input_nzw = string.gmatch(io.read(), "%d+")
    local n = tonumber(input_nzw())
    local z = tonumber(input_nzw())
    local w = tonumber(input_nzw())
    local a = {}
    for i in string.gmatch(io.read(), "%d+") do
        table.insert(a, tonumber(i))
    end
    
    if #a == 0 then
        return math.abs(z - w)
    end
    
    local sorted_nums = {a[#a]}
    local max_diff = math.abs(a[#a] - w)
    for i = #a - 1, 1, -1 do
        local idx = binary_search(sorted_nums, a[i], 1, #sorted_nums)
        local min_diff = 1000000000
        if idx <= #sorted_nums then
            min_diff = math.abs(sorted_nums[idx] - a[i])
        end
        if idx >= 2 then
            local diff = math.abs(sorted_nums[idx-1] - a[i])
            if diff < min_diff then
                min_diff = diff
            end
        end
        if min_diff > max_diff then
            max_diff = min_diff
        end
        table.insert(sorted_nums, idx, a[i])
    end
    return max_diff
end

print(main())