Buggy python submission (verdict: Runtime Error):
 while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1 or f == -1 :
        print 'F'
        if r == -1 :    
            break
    else :
        if score >= 80:
            print 'A'
        else:
            if score >= 65:
                print 'B'
            else:
                if score >= 50 or (score >= 30 and r >= 50):
                    print 'C'
                else:
                    if score >= 30:
                        print 'D'
                    else:
                        print 'F'

Fixed submission:
while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1  or  f ==  -1 :
        if m == -1 and f == -1 and r == -1 :
            break
        else: print 'F'
    elif score >= 80:
        print 'A'
    elif score >= 65:
        print 'B'
    elif score >= 50 or (score >= 30 and r >= 50):
        print 'C'
    elif score >= 30:
        print 'D'
    else:
        print 'F'

Buggy python submission (verdict: Runtime Error):
 while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1 or f == -1 :
        print 'F'
        if r == -1 :    
            break
    else :
        if score >= 80:
            print 'A'
        else:
            if score >= 65:
                print 'B'
            else:
                if score >= 50 or (score >= 30 and r >= 50):
                    print 'C'
                else:
                    if score >= 30:
                        print 'D'
                    else:
                        print 'F'

Fixed submission:
while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1  or  f ==  -1 :
        if m == -1 and f == -1 and r == -1 :
            break
        else: print 'F'
    elif score >= 80:
        print 'A'
    elif score >= 65:
        print 'B'
    elif score >= 50 or (score >= 30 and r >= 50):
        print 'C'
    elif score >= 30:
        print 'D'
    else:
        print 'F'

Buggy python submission (verdict: Runtime Error):
while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1 or f == -1
        if r == -1 :
            break
        else: print 'F'
    else :
        if score >= 80:
            print 'A'
        else:
            if score >= 65:
                print 'B'
            else:
                if score >= 50 or (score >= 30 and r >= 50):
                    print 'C'
                else:
                    if score >= 30:
                        print 'D'
                    else:
                        print 'F'

Fixed submission:
while 1:
    m,f,r=map(int,raw_input().split())
    #m:Midterm exam  f:final exam r:Retest
    score=m+f
    if m == -1  or  f ==  -1 :
        if m == -1 and f == -1 and r == -1 :
            break
        else: print 'F'
    elif score >= 80:
        print 'A'
    elif score >= 65:
        print 'B'
    elif score >= 50 or (score >= 30 and r >= 50):
        print 'C'
    elif score >= 30:
        print 'D'
    else:
        print 'F'