#include <iostream>
using namespace std;
int main() {
int nilai;
cin >> nilai;
if(86 <= nilai && nilai <= 100)
cout << "A" << endl;
else if(71 <= nilai && nilai <= 85)
cout << "B" << endl;
else if(56 <= nilai && nilai <= 70)
cout << "C" << endl;
else if(41 <= nilai && nilai <= 55)
cout << "D" << endl;
else
cout << "E" << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbmlsYWk7CgljaW4gPj4gbmlsYWk7CglpZig4NiA8PSBuaWxhaSAmJiBuaWxhaSA8PSAxMDApCgkJY291dCA8PCAiQSIgPDwgZW5kbDsKCWVsc2UgaWYoNzEgPD0gbmlsYWkgJiYgbmlsYWkgPD0gODUpCgkJY291dCA8PCAiQiIgPDwgZW5kbDsKCWVsc2UgaWYoNTYgPD0gbmlsYWkgJiYgbmlsYWkgPD0gNzApCgkJY291dCA8PCAiQyIgPDwgZW5kbDsKCWVsc2UgaWYoNDEgPD0gbmlsYWkgJiYgbmlsYWkgPD0gNTUpCgkJY291dCA8PCAiRCIgPDwgZW5kbDsKCWVsc2UKCQljb3V0IDw8ICJFIiA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=