n,z,w = list(map(int,input().split()))

a = list(map(int,input().split()))

xp = [0]*(n)

yp = [10000000000]*(n)

xp[0] = abs(a[n-1]-w)

for i in reversed(list(range(n))):

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

        xp[i] = max(xp[i], yp[j])

        yp[i] = min(yp[i], xp[j])

    xp[i] = max(xp[i], abs(a[i-1]-a[n-1]))

    yp[i] = min(yp[i], abs(a[i-1]-a[n-1]))

print((xp[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[n-1]-w),abs(a[n-1]-a[n-2]))))
n, z, w = list(map(int, input().split()))
a = list(map(int, input().split()))
xp = [0] * (n)
yp = [10000000000] * (n)
xp[0] = abs(a[n - 1] - w)
for i in reversed(list(range(n))):
    for j in range(i + 1, n):
        xp[i] = max(xp[i], yp[j])
        yp[i] = min(yp[i], xp[j])
    xp[i] = max(xp[i], abs(a[i - 1] - a[n - 1]))
    yp[i] = min(yp[i], abs(a[i - 1] - a[n - 1]))
print((xp[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[n - 1] - w), abs(a[n - 1] - a[n - 2]))))

-xp = [0] * (n) -yp = [10000000000] * (n) -xp[0] = abs(a[n - 1] - w) -for i in reversed(list(range(n))): -    for j in range(i + 1, n): -        xp[i] = max(xp[i], yp[j]) -        yp[i] = min(yp[i], xp[j]) -    xp[i] = max(xp[i], abs(a[i - 1] - a[n - 1])) -    yp[i] = min(yp[i], abs(a[i - 1] - a[n - 1])) -print((xp[0])) +if n == 1: +    print((abs(a[0] - w))) +else: +    print((max(abs(a[n - 1] - w), abs(a[n - 1] - a[n - 2]))))