import java.util.*;
class Example2_5 {
    public static void main(String args[]) {
        Scanner reader = new Scanner(System.in);
        int score = reader.nextInt();                   // ΄ΣΌόΕΜΦΠΆΑΘλ³ΙΌ¨
        switch (score/10) {
           case 9:
               System.out.print("A");break;
           case 8:
               System.out.print("B");break;
           case 7:
               System.out.print("C");break;
           case 6:
               System.out.print("D");break;
        }
    }
}
