n = input()
R = []
for i in range(n):
    R.append(input())

maxv = R[1] - R[0]
minv = R[0]
for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print "%d" % maxv n = input() n input() input R = [] R [] for i in range(n):
    R.append(input()) i range(n) range n R.append(input()) R.append R append input() input maxv = R[1] - R[0] maxv R[1] - R[0] R[1] R 1 R[0] R 0 minv = R[0] minv R[0] R 0 for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j]) j range(1, n) range 1 n maxv = max(maxv, R[j] - minv) maxv max(maxv, R[j] - minv) max maxv R[j] - minv R[j] R j minv minv = min(minv, R[j]) minv min(minv, R[j]) min minv R[j] R j print "%d" % maxv "%d" maxv maxv = R[1] - R[0] R[1] - R[0] maxv maxv = max(maxv, R[j] - minv) max(maxv, R[j] - minv) maxv minv = R[0] R[0] minv minv = min(minv, R[j]) min(minv, R[j]) minv n = input() input() n R = [] [] R
n = input()
R = []
for i in range(n):
    R.append(input())

maxv = R[1] - R[0]
minv = R[0]
for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print "%d" % maxv