Buggy python submission (verdict: Runtime Error):
n = (int)input()
while n > 0:
a[n] = (int)input()
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print "max"

   

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (int)input()
while n > 0:
a[n] = (int)input()
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print "max"

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (int)input()
i = 0
while n > i:
  a[i] = (int)input()
  i+=1
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print "max"

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (int)input()
i = 0
while n > i:
  a.append((int)input())
  i+=1
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print "max"

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (int)input()
i = 0
while n > i:
  a.append((int)input())
  i+=1
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (int)input()
a = []
for i in range(n):
     a.append((int)input())
  i+=1
for j in range(n):
     a.append((int)input())
   j+=1
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (input()
a = []
for i in range(n):
     a.append(input())
  i+=1
for j in range(n):
     a.append(input())
   j+=1
j = 1
i = 0
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (input()
a = []
j = 1
i = 0
for i in range(n):
     a.append(input())
  i+=1
for j in range(n):
     a.append(input())
   j+=1
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (input()
a = []
for i in range(n):
     a.append(input())
  i+=1
for j in range(n):
     a.append(input())
   j+=1
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (input()
a = []
for i in range(n):
     a.append(input())
 
for j in range(n):
     a.append(input())

max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = (input()
a = []
for i in range(n):
    a.append(input()) 
    for j in range(n):
     a.append(input())

max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = input():
a = []
a = [input for i in range(n)]
i = 0
j = 1
max = a[j]-a[i]
while n > i:
   j = i+1
   while n > j:
        if max < a[j]-a[i]:
           max = a[j]-a[i]
        j+=1
    i+=1

print max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = input()
a = []
a = [input for i in range(n)]
i = 0
j = 1
max = a[j]-a[i]
while n-1 > i:
   j = i+1
   while n-1 > j:
        if max < a[j]-a[i]:
           max = a[j]-a[i]
        j+=1
    i+=1

print max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans

Buggy python submission (verdict: Runtime Error):
n = input()
a = []
a = [input for i in range(n)]
i = 0
j = 1
max = a[j]-a[i]
while n > i:
   j = i+1
   while n > j:
        if max < a[j]-a[i]:
           max = a[j]-a[i]
        j+=1
    i+=1

print max

Fixed submission:
N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans