import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	}

}
 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	}

} Main public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	} main {
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	} BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); input new BufferedReader (new InputStreamReader (System.in)) int[] points = new int[3]; points new int[3] 3 for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		} ; {
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		} {
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		} String[] pointsStr = input.readLine().split(" "); pointsStr input.readLine().split(" ") input.readLine().split input.readLine() input.readLine input " " for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			} int insert = 0; int insert = 0; insert 0 insert <points.length insert points.length points points.length insert++ insert++ insert {
				points[insert] = Integer.parseInt(pointsStr[insert]);
			} {
				points[insert] = Integer.parseInt(pointsStr[insert]);
			} points[insert] = Integer.parseInt(pointsStr[insert]) points[insert] points insert Integer.parseInt(pointsStr[insert]) Integer.parseInt Integer pointsStr[insert] pointsStr insert if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} (points[0] == -1)&&(points[1] == -1)&&(points[2] == -1) (points[0] == -1)&&(points[1] == -1)&&(points[2] == -1) (points[0] == -1) points[0] points 0 -1 1 (points[1] == -1) points[1] points 1 -1 1 (points[2] == -1) points[2] points 2 -1 1 {
				break;
			} break; if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} (points[0] == -1)||(points[1] == -1) (points[0] == -1) points[0] points 0 -1 1 (points[1] == -1) points[1] points 1 -1 1 {
				System.out.println("F");
			} System.out.println("F") System.out.println System.out System System.out "F" if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} points[0] + points[1] >= 80 points[0] + points[1] points[0] points 0 points[1] points 1 80 {
				System.out.println("A");
			} System.out.println("A") System.out.println System.out System System.out "A" if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} (65 <= points[0] + points[1])&&(points[0] + points[1] <80) (65 <= points[0] + points[1]) 65 points[0] + points[1] points[0] points 0 points[1] points 1 (points[0] + points[1] <80) points[0] + points[1] points[0] points 0 points[1] points 1 80 {
				System.out.println("B");
			} System.out.println("B") System.out.println System.out System System.out "B" if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} ((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))) (50 <= points[0] + points[1])&&(points[0] + points[1] <65) (50 <= points[0] + points[1]) 50 points[0] + points[1] points[0] points 0 points[1] points 1 (points[0] + points[1] <65) points[0] + points[1] points[0] points 0 points[1] points 1 65 ((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50)) (30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50) (30 <= points[0] + points[1]) 30 points[0] + points[1] points[0] points 0 points[1] points 1 (points[0] + points[1] <50) points[0] + points[1] points[0] points 0 points[1] points 1 50 (points[2] >=50) points[2] points 2 50 {
				System.out.println("C");
			} System.out.println("C") System.out.println System.out System System.out "C" if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			} ((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50) ((30 <= points[0] + points[1])&&(points[0] + points[1] <50)) (30 <= points[0] + points[1]) 30 points[0] + points[1] points[0] points 0 points[1] points 1 (points[0] + points[1] <50) points[0] + points[1] points[0] points 0 points[1] points 1 50 (points[2] <50) points[2] points 2 50 {
				System.out.println("D");
			} System.out.println("D") System.out.println System.out System System.out "D" {
				System.out.println("F");
			} System.out.println("F") System.out.println System.out System System.out "F" String[] args args public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	}

} public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
		
		int[] points = new int[3];
		
		for(;;)
		{
			String[] pointsStr = input.readLine().split(" ");
			
			for(int insert = 0; insert <points.length; insert++)
			{
				points[insert] = Integer.parseInt(pointsStr[insert]);
			}
			
			if((points[0] == -1)&&(points[1] == -1)&&(points[2] == -1))
			{
				break;
			}
			
			else if((points[0] == -1)||(points[1] == -1))
			{
				System.out.println("F");
			}
			
			else if(points[0] + points[1] >= 80)
			{
				System.out.println("A");
			}
			
			else if((65 <= points[0] + points[1])&&(points[0] + points[1] <80))
			{
				System.out.println("B");
			}
			
			else if(((50 <= points[0] + points[1])&&(points[0] + points[1] <65)||((30 <= points[0] + points[1])&&(points[0] + points[1] <50)&&(points[2] >=50))))
			{
				System.out.println("C");
			}
			
			else if(((30 <= points[0] + points[1])&&(points[0] + points[1] <50))&&(points[2] <50))
			{
				System.out.println("D");
			}
			
			else
			{
				System.out.println("F");
			}
		}
	}

}

