#include<bits/stdc++.h>
using namespace std; 
int main(){
	float a;
	scanf("%f",&a);
		
	if(a<10.0f){
		printf("A\n");
	}else if(a>=10.0f && a<20.0f){
		printf("B\n");
	}else if(a>=20.0f && a<40.0f){
		printf("C\n");
	}else if(a>=40.0f && a<50.0f){
		printf("D\n");
	}else if(a>=50.0f && a<80.0f){
		printf("E\n");
	}
	
	return 0;
}
	
/**************************************************************
	Problem: 1044
	User: huanghao
	Language: C++
	Result: Accepted
	Time:11 ms
	Memory:2076 kb
****************************************************************/