N, Z, W = list(map(int, input().split()))

*A, = list(map(int, input().split()))



import sys

sys.setrecursionlimit(10**6)



memo = {}

def dfs(i, turn):

    if (i, turn) in memo:

        return memo[i, turn]

    if turn == 0:

        # X

        if i == 0:

            res = abs(W - A[-1])

        else:

            res = abs(A[i-1] - A[-1])

        for j in range(i+1, N):

            res = max(res, dfs(j, 1))

    else:

        # Y

        if i == 0:

            res = abs(Z - A[-1])

        else:

            res = abs(A[i-1] - A[-1])

        for j in range(i+1, N):

            res = min(res, dfs(j, 0))

    memo[i, turn] = res

    return res

print((dfs(0, 0)))

N, Z, W = list(map(int, input().split()))

*A, = list(map(int, input().split()))

if N == 1:

    print((abs(A[0] - W)))

else:

    print((max(abs(A[-1] - W), abs(A[-2] - A[-1]))))

N, Z, W = list(map(int, input().split()))
(*A,) = list(map(int, input().split()))
import sys

sys.setrecursionlimit(10**6)
memo = {}


def dfs(i, turn):
    if (i, turn) in memo:
        return memo[i, turn]
    if turn == 0:
        # X
        if i == 0:
            res = abs(W - A[-1])
        else:
            res = abs(A[i - 1] - A[-1])
        for j in range(i + 1, N):
            res = max(res, dfs(j, 1))
    else:
        # Y
        if i == 0:
            res = abs(Z - A[-1])
        else:
            res = abs(A[i - 1] - A[-1])
        for j in range(i + 1, N):
            res = min(res, dfs(j, 0))
    memo[i, turn] = res
    return res


print((dfs(0, 0)))

N, Z, W = list(map(int, input().split()))
(*A,) = list(map(int, input().split()))
if N == 1:
    print((abs(A[0] - W)))
else:
    print((max(abs(A[-1] - W), abs(A[-2] - A[-1]))))

-import sys - -sys.setrecursionlimit(10**6) -memo = {} - - -def dfs(i, turn): -    if (i, turn) in memo: -        return memo[i, turn] -    if turn == 0: -        # X -        if i == 0: -            res = abs(W - A[-1]) -        else: -            res = abs(A[i - 1] - A[-1]) -        for j in range(i + 1, N): -            res = max(res, dfs(j, 1)) -    else: -        # Y -        if i == 0: -            res = abs(Z - A[-1]) -        else: -            res = abs(A[i - 1] - A[-1]) -        for j in range(i + 1, N): -            res = min(res, dfs(j, 0)) -    memo[i, turn] = res -    return res - - -print((dfs(0, 0))) +if N == 1: +    print((abs(A[0] - W))) +else: +    print((max(abs(A[-1] - W), abs(A[-2] - A[-1]))))