let z=(-1);;let rec g()=Scanf.scanf"%d %d %d
"(fun m f r->if m<>z||f<>z||r<>z then g(print_endline(if m=z||f=z then"F"else let x=m+f in if x>=80then"A"else if x>=65then"B"else if x>=50||x>=30&&r>=50then"C"else if x>=30then"D"else"F")));;g()