import java.util.Scanner;


public class Main {

	public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		}

		

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		}

		

} Main public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		} main {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		} true {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		} long m = sc.nextInt(); m sc.nextInt() sc.nextInt sc long f = sc.nextInt(); f sc.nextInt() sc.nextInt sc long r = sc.nextInt(); r sc.nextInt() sc.nextInt sc if(m == -1 && f == -1 && r == -1) break; m == -1 && f == -1 && r == -1 m == -1 && f == -1 && r == -1 m == -1 m -1 1 f == -1 f -1 1 r == -1 r -1 1 break; String point = new String(); point new String() if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			} m == -1 || f == -1 m == -1 m -1 1 f == -1 f -1 1 {
				point = "F";
				
			} point = "F" point "F" if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			} m + f >= 80 m + f m f 80 {
				point = "A";
				
			} point = "A" point "A" if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			} m + f >= 65 m + f m f 65 {
				point = "B";
				
			} point = "B" point "B" if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			} m + f >= 50 m + f m f 50 {
				point = "C";
				
			} point = "C" point "C" if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			} m + f >= 30 m + f m f 30 {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			} if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				} r >= 50 r 50 {
					point = "C";
				} point = "C" point "C" {
					point = "D";
					
				} point = "D" point "D" if(m + f >= 0) {
				point = "F";
				
			} m + f >= 0 m + f m f 0 {
				point = "F";
				
			} point = "F" point "F" System.out.println(point) System.out.println System.out System System.out point String [] args args public class Main {

	public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		}

		

} public class Main {

	public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		}

		

} Main
import java.util.Scanner;


public class Main {

	public static void main(String [] args) {
		
		Scanner sc = new Scanner(System.in);
		
		while(true) {
			
			long m = sc.nextInt();
			long f = sc.nextInt();
			long r = sc.nextInt();
			
			if(m == -1 && f == -1 && r == -1) break;
				
			String point = new String();
			
			if(m == -1 || f == -1) {
				point = "F";
				
			}else if(m + f >= 80) {
				point = "A";
				
			}else if(m + f >= 65) {
				point = "B";
				
			}else if(m + f >= 50) {
				point = "C";
				
			}else if(m + f >= 30) {
				if(r >= 50) {
					point = "C";
				}else {
					point = "D";
					
				}
				
			}else if(m + f >= 0) {
				point = "F";
				
			}
			
			System.out.println(point);
			
			
		}
			
		}

		

}
