import java.util.Scanner;

public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String grade =scanner.next();

    //write your code here......
    if(grade.equals("A")){
        System.out.print("优秀");
    }else if(grade.equals("B")){
        System.out.print("良好");
    }else if(grade.equals("C")){
        System.out.print("及格");
    }else if(grade.equals("D")){
        System.out.print("不及格");
    }else{
        System.out.print("未知等级");
    }
    scanner.close();
}

}