#include<iostream>
#include<cstdio>
using namespace std;

int main() {
    
    int score;
    cin >> score;

    // write your code here......
    if(score<=0||score>100){
        cout<<"成绩不合法"<<endl;
        return 0;
    }
    switch(score/10){
        case 10:
        case 9: cout<<"优秀"<<endl;break;
        case 8:  cout<<"良"<<endl;break;
        case 7:  cout<<"中"<<endl;break;
        case 6:  cout<<"及格"<<endl;break;
        default:   cout<<"差"<<endl;break;
    }

    return 0;
}