import java.util.Scanner;
public class Stu{
public static void stuGrade(){
Scanner input = new Scanner(System.in);
String [] standard = {"E","G","M","F"};
String [] grade = {"优秀","良好","中等","不合格"};
messageshow("请输入学生状况:");
String stu ;
boolean judge = false;
stu = input.next();
for(int i = 0 ; i < standard.length ; i ++){
if( stu.equals (standard [i])){
System.out.println(grade [i]);
judge = true;
break;
}
}
if(judge == true){
messageshow("继续Y/N");
String str = input.next();
if(str.equals("Y"))
stuGrade();
else{
messageshow("退出系统");
}
}
if(judge == false){
messageshow("输入非法");
}
}
public static void messageshow(String str){
System.out.print(str);
}
public static void main(String [] args){
stuGrade();
}
}