import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	}

} Main public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	} main {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	} int[] NumList = new int[3]; NumList new int[3] 3 int Result = 0; Result 0 try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println(e);
		} NumberFormatException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			} true {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			} String line = br.readLine(); line br.readLine() br.readLine br if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				} line != null line null {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				} String[] InputList = line.split(" ", 0); InputList line.split(" ", 0) line.split line " " 0 for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					} int i = 0; int i = 0; i 0 i < InputList.length i InputList.length InputList InputList.length i++ i++ i {
						NumList[i] = Integer.parseInt(InputList[i]);
					} {
						NumList[i] = Integer.parseInt(InputList[i]);
					} NumList[i] = Integer.parseInt(InputList[i]) NumList[i] NumList i Integer.parseInt(InputList[i]) Integer.parseInt Integer InputList[i] InputList i if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					} !Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1) !Arrays.asList(NumList[0]).contains(-1) Arrays.asList(NumList[0]).contains(-1) Arrays.asList(NumList[0]).contains Arrays.asList(NumList[0]) Arrays.asList Arrays NumList[0] NumList 0 -1 1 !Arrays.asList(NumList[1]).contains(-1) Arrays.asList(NumList[1]).contains(-1) Arrays.asList(NumList[1]).contains Arrays.asList(NumList[1]) Arrays.asList Arrays NumList[1] NumList 1 -1 1 {

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					} Result = NumList[0] + NumList[1] Result NumList[0] + NumList[1] NumList[0] NumList 0 NumList[1] NumList 1 if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						} !Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1) !Arrays.asList(NumList[0]).contains(-1) Arrays.asList(NumList[0]).contains(-1) Arrays.asList(NumList[0]).contains Arrays.asList(NumList[0]) Arrays.asList Arrays NumList[0] NumList 0 -1 1 !Arrays.asList(NumList[1]).contains(-1) Arrays.asList(NumList[1]).contains(-1) Arrays.asList(NumList[1]).contains Arrays.asList(NumList[1]) Arrays.asList Arrays NumList[1] NumList 1 -1 1 {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						} if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							} Result >= 80 Result 80 {
								System.out.println("A");
							} System.out.println("A") System.out.println System.out System System.out "A" if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							} Result >= 65 Result 65 {
								System.out.println("B");
							} System.out.println("B") System.out.println System.out System System.out "B" if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							} Result >= 50 Result 50 {
								System.out.println("C");
							} System.out.println("C") System.out.println System.out System System.out "C" if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							} Result >= 30 Result 30 {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							} if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								} NumList[2] >= 50 NumList[2] NumList 2 50 {
									System.out.println("C");
								} System.out.println("C") System.out.println System.out System System.out "C" {
									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" {
							System.out.println("F");
						} System.out.println("F") System.out.println System.out System System.out "F" {
						break;
					} break; {
					break;
				} break; String[] args args public class Main {

	public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	}

} public class Main {

	public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) {

		int[] NumList = new int[3];

		int Result = 0;


		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			while (true) {
				//??\??????????????????
				String line = br.readLine();

				if (line != null) {
					//???????????????????????????
					String[] InputList = line.split(" ", 0);

					//?????????????????´??°???Int???
					for (int i = 0; i < InputList.length; i++) {
						NumList[i] = Integer.parseInt(InputList[i]);
					}

					//????????????????????§??????
					if(!Arrays.asList(NumList[0]).contains(-1) || !Arrays.asList(NumList[1]).contains(-1)){

						//???????????£??\
						Result = NumList[0] + NumList[1];

						//????¨?????????????????????????
						if (!Arrays.asList(NumList[0]).contains(-1) && !Arrays.asList(NumList[1]).contains(-1)) {

							//??????A????????¶
							if(Result >= 80){
								System.out.println("A");
							}
							//??????B????????¶
							else if (Result >= 65) {
								System.out.println("B");
							}
							//??????C????????¶
							else if (Result >= 50) {
								System.out.println("C");
							}
							//??????D????????¶
							else if (Result >= 30) {
								if (NumList[2] >= 50) {
									System.out.println("C");
								}else {
									System.out.println("D");
								}
							}
							else {
								System.out.println("F");
							}
						}
						else{
							System.out.println("F");
						}
					}else{
						break;
					}
				}else {
					break;
				}
			}

		}catch (NumberFormatException e) {
			System.out.println(e);
		}catch (IOException e) {
			System.out.println(e);
		}


	}

}