Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    elif m + f == 60 < 80:
        print('B')

    elif m + f == 50 < 65:
        print('C')

    if m + f == 30 < 50:
        print('D')

    elif r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    if m + f == 60 < 80:
        print('B')

    if m + f == 50 < 65:
        print('C')

    if m + f == 30 < 50:
        print('D')

    if r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    elif m + f == 60 < 80:
        print('B')

    elif m + f == 50 < 65:
        print('C')

    if m + f == 30 < 50:
        print('D')

    elif r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    elif m + f == 60 < m + f ==80:
        print('B')

    elif m + f == 50 < m + f ==65:
        print('C')

    if m + f == 30 < m + f ==50:
        print('D')

    elif r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    if m + f == 60 < m + f ==80:
        print('B')

    if m + f == 50 < m + f ==65:
        print('C')

    if m + f == 30 < m + f ==50:
        print('D')

    if r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    if m + f <= 60 and m + f > 80:
        print('B')

    if m + f <= 50 and m + f > 65:
        print('C')

    if m + f <= 30 and m + f  >50:
        print('D')

    if r <= 50:
        print('C')

    else:
        print('F')

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        return 'A'

    if m + f <= 60 and m + f > 80:
        return 'B'

    if m + f <= 50 and m + f > 65:
        return 'C'

    if m + f <= 30 and m + f  >50:
        return 'D'

    if r <= 50:
        return 'C'

    else:
        return 'F'

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        return 'A'

    if m + f <= 60 and m + f > 80:
        return 'B'

    if m + f <= 50 and m + f > 65:
        return 'C'

    if m + f <= 30 and m + f > 50:
        return 'D'

    if r <= 50:
        return 'C'

    else:
        return 'F'

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    else:
        print('A')
        

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')
    else:
        print('A')
        

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65 or r > 50:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')
        

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')

Buggy python submission (verdict: Runtime Error):
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65 or r >= 50:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')
        

Fixed submission:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')