Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = set()
max = -10^9
x=0
for i in range(n-1)
    l.add(int(raw_input())

for s in range(n-1)
 for t in range(s-1)
  x= l[n-s]-l[n-t]
  if max<x:
   max=x
printf('%d')%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = set()
max = -10^9
x=0
for i in range(n-1)
    l.add(int(raw_input())

for s in range(n-1)
 for t in range(s-1)
  x= l[n-s-1]-l[n-t-1]
  if max<x:
   max=x
printf('%d')%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = []
max = -10^9
x=0
for i in range(n-1)
    l.append(int(raw_input())

for s in range(n-1)
 for t in range(s-1)
  x= l[n-s-1]-l[n-t-1]
  if max<x:
   max=x
printf('%d')%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = []
max = -10^9
x=0
for i in range(n-1):
    l.append(int(raw_input())

for s in range(n-1):
 for t in range(s-1):
  x= l[n-s-1] - l[n-t-1]
  if max<x:
   max=x
printf('%d')%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = []
max = -10^9
x=0
for i in (n-1):
    l.append(int(raw_input())

for s in (n-1):
 for t in (s-1):
  x= l[n-s-1] - l[n-t-1]
  if max<x:
   max=x
printf('%d')%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = []
max = -10^9
x=0
for i in range(n-1):
    l.append(int(raw_input())

for s in range(n-1):
 for t in range(s-1):
  x= l[n-s-1] - l[n-t-1]
  if max<x:
   max=x
printf'%d'%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
l = []
max = -10^9
x=0
for i in range(n-1):
    l.append(int(raw_input())

for s in range(n-1):
 for t in range(s-1):
  x= l[n-s-1] - l[n-t-1]
  if max<x:
   max=x
print'%d'%(max)

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
max = -10^9
min = 10^9
ans = -10^9
for i in range(n):
 x[i] = int(raw_input())
for s in range(n-1):
 for t in range(n-1):
  if ans < (x[n-1-s]-x[n-1-t]):
   ans=x[n-1-s]-x[n-1-t]
print ans

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
max = -10^9
min = 10^9
ans = -10^9
for i in range(n):
 x[i] = int(raw_input())
for s in range(n):
 for t in range(n):
  if ans < (x[n-1-s]-x[n-1-t]):
   ans=x[n-1-s]-x[n-1-t]
print ans

Fixed submission:
n = int(raw_input())
max = -10**9
x1 = input() 
min = x1

for i in range(n-1):
 x = int(raw_input())

 if max < x-min:
  max = x- min
 if x< min:
  min = x
  
print max