Problem:

Grading

  Write a program which reads a list of student test scores and evaluates the performance for each student.

  The test scores for a student include scores of the midterm examination m (out of 50), the final examination f (out of 50) and the makeup examination r (out of 100). If the student does not take the examination, the score is indicated by -1.

  The final performance of a student is evaluated by the following procedure:

  
If the student does not take the midterm or final examination, the student's grade shall be F.

  
If the total score of the midterm and final examination is greater than or equal to 80, the student's grade shall be A.

  
If the total score of the midterm and final examination is greater than or equal to 65 and less than 80, the student's grade shall be B.

  
If the total score of the midterm and final examination is greater than or equal to 50 and less than 65, the student's grade shall be C.

  
If the total score of the midterm and final examination is greater than or equal to 30 and less than 50, the student's grade shall be D. However, if the score of the makeup examination is greater than or equal to 50, the grade shall be C.

  
If the total score of the midterm and final examination is less than 30, the student's grade shall be F.

Input

  The input consists of multiple datasets. For each dataset, three integers m, f and r are given in a line.

  The input ends with three -1 for m, f and r respectively. Your program should not process for the terminal symbols.

The number of datasets (the number of students) does not exceed 50.

Output

  For each dataset, print the grade (A, B, C, D or F) in a line.

Sample Input

40 42 -1
20 30 -1
0 2 -1
-1 -1 -1

Sample Output

A
C
F



Sample input:
40 42 -1
20 30 -1
0 2 -1
-1 -1 -1


Sample output:
A
C
F

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

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

    if m == -1 or f == -1:
        print("F")

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

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

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

    elif r >= 50:
        print("C")

    if m + f < 30:
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

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

    if m == -1 or f == -1:
        print("F")

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

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

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

    elif 30 <= m + f < 50 and r >= 50:
        print("C")

    if m + f < 30:
        print("F")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

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

    if m == -1 or f == -1:
        print("F")

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

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

    elif 30 <= m + f < 50:
        if r > 50:
            print("C")
        else:
            print("D")

    if m + f < 30:
        print("F")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

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

    elif m == -1 or f == -1:
        print("F")

    elif m + f >= 80:
        print("A")

    elif 65 <= m + f < 80:
        print("B")

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

    elif 30 <= m + f < 50:
        if r > 50:
            print("C")
        else:
            print("D")

    elif m + f < 30:
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

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

    elif m == -1 or f == -1:
        print("F")

    elif m + f >= 80:
        print("A")

    elif 65 <= m + f < 80:
        print("B")

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

    elif 30 <= m + f < 50:
        if r > 50:
            print("C")
        else:
            print("D")

    else
        print("F")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
while True:
if m == -1 or f == -1 or m + f < 30:
        print('F')
    elif m + f >= 80:
        print('A')
    elif m + f >= 65:
        print('B')
    elif m + f >= 50:
        print('C')
    elif m + f >= 30:
        print('C' if r >= 50 else 'D')

Submission status: Runtime Error

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

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

    elif m or f == -1:
        print('F')

    elif m + f >= 80:
        print('A')

    elif m + f >= 65 < 79:
        print('B')

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

    elif m + f >= 30 < 49:
        print('D')

    elif m + f >= 50 < 49:
        r >= 50:
        print('C')
    
    else:
        print('F')

Submission status: Runtime Error

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

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

    elif m == -1 or f == -1:
        print("F")

    elif m + f >= 80:
        print("A")

    elif 65 <= m + f < 80:
        print("B")

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

    elif 30 <= m + f < 50:
        if r > 50:
            print("C")
        else:
            print("D")

    else
        print("F")

Submission status: Runtime Error

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

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

    elif m or f == -1:
        print('F')

    elif m + f >= 80:
        print('A')

    elif m + f >= 65 < 79:
        print('B')

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

    elif m + f >= 30 < 49:
        print('D')

    elif m + f >= 50 < 49:
        r >= 50:
        print('C')
    
    elif m + f < 30:
        print('F')

Submission status: Runtime Error

Solution code:
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'

Submission status: Runtime Error

Solution code:
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'

Submission status: Runtime Error

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

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

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

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

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

    if 30 <= m + f < 50:
        elif r >= 50:
            print("C")
        else:
            print("D")
            
    print()

Submission status: Runtime Error

Solution code:
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      print("A")
   elif 65 <= m+f < 80:
      print("B")
   elif 50 <= m+f < 65:
      print("C")
   elif 30 <= m+f < 50:
      if r >= 50:
        print("C")
      else:
        print("D")
   else:
      print("F")

Submission status: Runtime Error

Solution code:
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      print("A")
   elif 65 <= m+f < 80:
      print("B")
   elif 50 <= m+f < 65:
      print("C")
   elif 30 <= m+f < 50:
      if r >= 50:
        print("C")
      else:
        print("D")
   elif m+f < 30:
      print("F")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:

    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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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:
        pirnt("B")

    else:
         print("A")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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 anfd r < 50:
        print('D')

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

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
date=[[],[],[]]
a,b,c=0,0,0
while True:
   if a < 0 and b < 0 and c < 0:
      break
   else:
      a,b,c =[int(i) for i in input().split()]
      date[0].append(a)
      date[1].append(b)
      date[2].append(c)
for h in range(0,len(date[0])-1):
   if date[0][h] == -1 or date[1][h] == -1:
      print("F")
   elif date[0][h] == date[1][h] == date[2][h]:
      break
   else:
      if date[0][h] + date[1][h] >= 80:
         print("A")
      else:
         if date[0][h] + date[1][h] >= 65:
            print("B")
         else:
            if date[0][h] + date[1][h] >= 50:
               print("C")
            else:
               if date[0][h] + date[1][h] >=30:
                  if date[2] >= 50:
                     print("C")
                  else:
                     print("D")
               else:
                  print("F")

Submission status: Runtime Error

Solution code:
n,m = map(int,raw_input().split())
A = [[0 for i in range(m)] for i in range(n)]
B = [ 0 for i in range(m)]


for i in range(n):
    A[i] = map(int,raw_input().split())
for i in range(m):
    B[i] = input()

for i in range(n):
    sum = 0
    for j in range(m):
        sum += A[i][j] * B[j] 
    print sum

Submission status: Runtime Error

Solution code:
while True:
    points = list(map(int,input().split()))
    if points==[-1,-1,-1]: break
    sum_pt = sum(points[0:2])
    if points[0]==-1 or points[1]==-1 or sum_pt<30: print('F')
    elif sum_pt<50 and point[2]<50: print('D')
    elif sum_pt<65: print('C')
    elif sum_pt<80: print('B')
    else: print('A')

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if (m, f, r) = (-1, -1, -1):
        break
    if m+f >= 80:
        print("A")
    elif m+f >= 65 and m+f < 80:
        print("B")
    elif m+f >= 50 and m+f < 65:
        print("C")
    elif m+f >= 30 and m+f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
while(True)
	m,f,r=list(map(int,input().split()))
	if m==-1 and f==-1 and r==-1:
		break
	if m==-1 or f==-1:
		print("F")
	elif m+f>=80:
		print("A")
	elif m+f>=65:
		print("B")
	elif m+f>=50:
		print("C")
	elif m+f>=30:
		if r>=50:
			print("C")
		else:
			print("D")
	else:
		print("F")

Submission status: Runtime Error

Solution code:
while(1):
m,f,r = map(int,input().split())
    if (m == -1 or f == -1) or m + f < 30:
        print("F")
    elif 80 <= m + f :
        print("A")
    elif 65 <= m + f < 80:
        print("B")
    elif 50 <= m + f < 65:
        print("C")
    elif 30 <= m + f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m == -1 and f == -1 and r == -1:
        break

Submission status: Runtime Error

Solution code:
while 1:
m,f,r = map(int,input().split())
    if (m == -1 or f == -1) or m + f < 30:
        print("F")
    elif 80 <= m + f :
        print("A")
    elif 65 <= m + f < 80:
        print("B")
    elif 50 <= m + f < 65:
        print("C")
    elif 30 <= m + f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m == -1 and f == -1 and r == -1:
        break

Submission status: Runtime Error

Solution code:
while 1:
    m,f,r = map(int,input().split())
    if m == -1 or f == -1 or m + f < 30:
        print("F")
    elif 80 <= m + f :
        print("A")
    elif 65 <= m + f < 80:
        print("B")
    elif 50 <= m + f < 65:
        print("C")
    elif 30 <= m + f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m == -1 and f == -1 and r == -1:
            break

Submission status: Runtime Error

Solution code:
while 1:
    m,f,r = map(int,input().split())
    if m == -1 or f == -1 or m + f < 30:
        print("F")
    elif 80 <= m + f :
        print("A")
    elif 65 <= m + f < 80:
        print("B")
    elif 50 <= m + f < 65:
        print("C")
    elif 30 <= m + f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m == -1 and f == -1 and r == -1:
        break

Submission status: Runtime Error

Solution code:
 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'

Submission status: Runtime Error

Solution code:
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'

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3

import sys


def main():
    while True:
        # m, f, r = [int(score) for score in sys.stdin.readline().split()]
        m, f, r = [int(score) for score in lines.split()]
        if m == f == r == -1:
            break
        if m == -1 or f == -1:
            print('F')
        elif m+f >= 80:
            print('A')
        elif 80 > m+f >= 65:
            print('B')
        elif 65 > m+f >= 50:
            print('C')
        elif 50 > m+f >= 30:
            if r >= 50:
                print('C')
            else:
                print('D')
        elif m+f < 30:
            print('F')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
while(1):
	m, f, r = map(int, input().split())
	if m == -1 and f == -1 and r == -1:
		break
	
	if m == -1 or f = -1:
		print("f")
	elif m + f >= 80:
		print("A")
	elif m + f >= 65:
		print("B")
	elif m + f >= 50:
		print("C")
	elif m + f >= 30:
		if r >= 50:
			print("C")
		else:
			print("D")
	else:
		print("F")

Submission status: Runtime Error

Solution code:
while(1):
	m, f, r = map(int, input().split())
	if m == -1 and f == -1 and r == -1:
		break
	
	if m == -1 or f = -1:
		print("F")
	elif m + f >= 80:
		print("A")
	elif m + f >= 65:
		print("B")
	elif m + f >= 50:
		print("C")
	elif m + f >= 30:
		if r >= 50:
			print("C")
		else:
			print("D")
	else:
		print("F")

Submission status: Runtime Error

Solution code:
while(1):
	m, f, r = map(int, input().split())
	if m == -1 and f == -1 and r == -1:
		break
	
	if m == -1 or f = -1:
		print('F')
	elif m + f >= 80:
		print('A')
	elif m + f >= 65:
		print('B')
	elif m + f >= 50:
		print('C')
	elif m + f >= 30:
		if r >= 50:
			print('C')
		else:
			print('D')
	else:
		print('F')

Submission status: Runtime Error

Solution code:
pupils = []

while True:
    l = list(map(int, input().split()))
    if sum(l) == -3:
        break
    pupils.append(l)

for pupil in pupils:
    score = pupil[0] + pupil[1]
    if pupil[0] == -1 or  pupil[1] == -1:
        rank = 'F'
    elif score >= 80:
        rank = 'A'
    elif score >= 65:
        rank = 'B'
    elif (score >= 50) or (score >= 30 and r >= 50):
        rank = 'C'
    else:
        rank = 'F'
    print(rank)

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, raw_input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif m == -1 or f == -1:
        print "F"
    elif m + f >= 80:
        print "A"a
    elif m + f >= 65:
        print "B"
    elif m + f >= 50:
        print "C"
    elif m + f >= 30 and f >= 50:
        print "C"
    elif m + f >= 30:
        print "D"
    else:
        print "F"

Submission status: Runtime Error

Solution code:
while True:
	numlist = list(int(i) for i in input().split())
	mid = numlist[0]
	final = numlist[1]
	retest = numlist[2]


	

	sum = mid + final

	if mid == -1 or final == -1:
		print("F")
	elif mid == -1 and final == -1 and retest == -1:
		break
	elif sum >= 80:
		print("A")
	elif 80 > sum >= 65:
		print("B")
	elif 65 > sum >= 50:
		print("C")
	elif 50 > sum >= 30 and retest < 50:
		print("D")
	elif 50 > sum >= 30 and retest >= 50:
		print("C")
	elif sum < 30:
		print("F")

Submission status: Runtime Error

Solution code:
while True:
	numlist = list(int(i) for i in input().split())
	mid = numlist[0]
	final = numlist[1]
	retest = numlist[2]

	sum = mid + final

	if mid == -1 or final == -1:
		print("F")
	elif mid == -1 and final == -1 and retest == -1:
		break
	elif sum >= 80:
		print("A")
	elif 80 > sum >= 65:
		print("B")
	elif 65 > sum >= 50:
		print("C")
	elif 50 > sum >= 30 and retest < 50:
		print("D")
	elif 50 > sum >= 30 and retest >= 50:
		print("C")
	elif sum < 30:
		print("F")

Submission status: Runtime Error

Solution code:
while True:
    m,f,r=map(int,input().split())
    if m==-1 and f==-1 and r==-1:
        break
        
    elif m==-1 or f==-1:
        print('F')
    elif m+f>=80:
        print("A")
    elif m+f>=65:
        print("B")
    elif m+f>=50 or (r>=50 and m+f>=30:
        print('C')
    elif m+f>=30:
        print("D")
    elif m+f<30 :
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    if input()=="-1 -1 -1":
        break
    points = list(map(int,input().split()))
    gou = points[0] + points[1]
    if gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    points = list(map(int,input().split()))

    if points == [-1,-1,-1]:
        break

    gou = points[0] + points[1]
    if -1 in points[0] or -1 in points[1]:
        print("F")
    elif gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
while(True):
    m,f,r = [int(i) for i in input().split()]
    if(m == -1 and f == -1 and r == -1):
        break
    if(m == -1 or f == -1):
        print('F')
    elif(m + f >= 80):
        print('A')
    elif(65 <= m + f <= 80):
        prin('B')
    elif(50 <= m + f <= 65):
        print('C')
    elif(30 <= m + f <= 50):
        print('D')
        if(r >=50):
            print('C')
    else:
        print('F')

Submission status: Runtime Error

Solution code:
while True:
    m,f,r=map(raw_int, input().split())
    s=m+f
    if m==-1 and f==-1 and r==-1:
        break
    elif m==-1 or f==-1 or s <30:
        print 'F'
    elif s <50 and r <50:
        print 'D'
    elif s <65:
        print 'C'
    elif s <80:
        print 'B'
    else:
        print 'A'

Submission status: Runtime Error

Solution code:
While 1:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    if m+f >= 80:print('A')
    elif m+f >= 65:print('B')
    elif m+f >= 50:print('C')
    elif m+f >= 30:
        if r > 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
While 1:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    a=m+f
    if a >= 80:print('A')
    elif a >= 65:print('B')
    elif a >= 50:print('C')
    elif a >= 30:
        if r > 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
While True:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    a=m+f
    if a >= 80:print('A')
    elif a >= 65:print('B')
    elif a >= 50:print('C')
    elif a >= 30:
        if r > 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
While True:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    a=m+f
    if a >= 80:print('A')
    elif a >= 65:print('B')
    elif a >= 50:print('C')
    elif a >= 30:
        if r >= 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
While 1:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    a=m+f
    if m==-1 or f==-1:print('F')
    elif a >= 80:print('A')
    elif a >= 65:print('B')
    elif a >= 50:print('C')
    elif a >= 30:
        if r >= 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
While True:
    m,f,r=map(int,input().split())
    if m==f==r==-1:break
    a=m+f
    if m==-1 or f==-1:print('F')
    elif a >= 80:print('A')
    elif a >= 65:print('B')
    elif a >= 50:print('C')
    elif a >= 30:
        if r >= 50:print('C')
        else:print('D')
    else:print('F')

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python
# -*- coding : utf-8 -*-
while True:
    m, f, r = map(int,input().split())
    if m + f >= 80:
        print("A")
    elif m + f >= 65 and m + f < 80:
        print("B")
    elif m + f >= 50 and m + f < 65:
        print("C")
    elif m + f >= 30 and m + f < 50:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m + f < 30:
        print("F")

Submission status: Runtime Error

Solution code:

while True:
    m,f,r=list(map(int,input()))
    if m==f==r==-1: break
    s=m+r
    print('F' if m*f<0 or s<30 else 'D' if 30<=s<50 and r<50 else 'C' if 50<=s<65 or m>=50 else 'B' if 65<=s<80 else 'A')

Submission status: Runtime Error

Solution code:
m,f,r=map(int,input().split())
if m==-1 or f==-1 or m+f<30:
    print('F')
elif m==f==r==-1:
    break
elif m+f>=80:
    print('A')
elif 65<=m+f<80:
    print('B')
elif 50<=m+f<65 or r>=50:
    print('C')
else:
    print('D')

Submission status: Runtime Error

Solution code:
 if m==f==r==-1:
  break
 else:
  if m==-1 or f==-1 or m+f<30:
   print('F')
  elif m+f>=80:
   print('A')
  elif 80>m+f>=65:
   print('B')
  elif (65>m+f>=50) or (50>m+f>=35 and r>=50):
   print('C')
  else:
   print('D')

Submission status: Runtime Error

Solution code:
while 1:
 m,f,r=map(int,input().split());s=m+f
 if m*f<-1:break
 if m==-1 or f==-1 or s<30:print('F')
 elif s>79:print('A')
 elif s>64:print('B')
 elif s>49 or r>49:print('C')
 else:print('D')

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif m == -1 or f == -1:
        grade = "F"
    elif (m + f) => 80:
        grade = "A"
    elif (m + f) => 65:
        grade = "B"
    elif (m + f) => 50:
        grade = "C"
    elif (m + f) => 30:
        if r > 50:
            grade = "C"
        else:
            grade = "D"
    else:
        grade = "F"
    print(grade)

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif m == -1 or f == -1:
        grade = "F"
    elif (m + f) >= 80:
        grade = "A"
    elif (m + f) => 65:
        grade = "B"
    elif (m + f) => 50:
        grade = "C"
    elif (m + f) => 30:
        if r > 50:
            grade = "C"
        else:
            grade = "D"
    else:
        grade = "F"
    print(grade)

Submission status: Runtime Error

Solution code:
import sys

while True:
    n = sys.stdin.readline()[:-1]

    if n = '-1 -1 -1':
        break

    marks = [ int(m) for m in n.split() ]

    mt_points,retest = marks[0] + marks[1],marks[2]

    if -1 in marks[:-1]:
        print('F')
        continue
    elif mt_points >= 80:
        print('A')
        continue
    elif mt_points >= 65 and 80 > mt_points:
        print('B')
        continue
    elif mt_points >= 50 and 65 > mt_points:
        print('C')
        continue
    elif mt_points >= 30 and 50 > mt_points:
        if retest >= 50:
            print('C')
            continue
        print('D')
        continue
    elif 30 > mt_points:
        print('F')

Submission status: Runtime Error

Solution code:
m = []
f = []
r = []
while(True):
    M,F,R=map(int,input().split())
    if M == -1 and F == -1 and R == -1:
        break
    else:
        m.append(M)
        f.append(F)
        r.append(R)
for i in range(len(m)):
    if (m == -1 or f ==-1) or m+f<30:
        print("F")
    elif m+f>=80:
        print("A")
    elif m+f<80 and m+f>=65:
        print("B")
    elif m+f<65 and m+f>=50:
        print("C")
    elif m+f<50 and m+f>=30:
        print("D")
    elif m+f<30 and r>50:
        print("C")
    elif m+f<30 and r<50:
        print("D")