#include<iostream>
#include<string>
#include<math.h>
#include<string.h>
using namespace std;
int main()
{
int x;
cin>>x;
if ( x>=80 && x<=100) cout<< "A" ;
if ( x>=70 && x<=79) cout<< "B" ;
if ( x>=60 && x<=69) cout<< "C" ;
if ( x>=0 && x<=59) cout<< "D" ;
}
#include<string>
#include<math.h>
#include<string.h>
using namespace std;
int main()
{
int x;
cin>>x;
if ( x>=80 && x<=100) cout<< "A" ;
if ( x>=70 && x<=79) cout<< "B" ;
if ( x>=60 && x<=69) cout<< "C" ;
if ( x>=0 && x<=59) cout<< "D" ;
}