#include <iostream>
using namespace std;
#define PRINT_GRADE(score) \
if(score>100)\
{\
cout<<"成绩不合法"<<endl;\
}\
else if (score >= 90) { \
cout << "优秀" << endl; \
} else if (score >= 80) { \
cout << "良" << endl; \
} else if (score >= 70) { \
cout << "中" << endl; \
} else if (score >= 60) { \
cout << "及格" << endl; \
} else if (score >= 0 && score < 60) {\
cout << "差" << endl; \
} else { \
cout << "成绩不合法" << endl; \
}
int main() {
int score;
cin >> score;
// write your code here......
PRINT_GRADE(score);
return 0;
}