#include <cctype>
#include <iostream>
using namespace std;
int pwd_len_score(int len) {
int score = 0;
if ( len <= 4)
score = 5;
else if ( len <= 7)
score = 10;
else
score = 25;
return score;
}
int letter_score(int cnt_upper, int cnt_lower) {
int score = 0;
if (((cnt_upper > 0) && (cnt_lower == 0)) || ((cnt_upper == 0) &&
(cnt_lower > 0))) {
score = 10;
} else if ((cnt_upper > 0) && (cnt_lower > 0)) {
score = 20;
}
return score;
}
int digit_score( int cnt_digit ) {
int score = 0;
if (cnt_digit == 1)
score = 10;
else if (cnt_digit > 1)
score = 20;
return score;
}
int symbol_score(int cnt_symbol) {
int score = 0;
if ( cnt_symbol == 1)
score = 10;
else if ( cnt_symbol > 1)
score = 25;
return score;
}
int reward_score( int cnt_lower, int cnt_upper, int cnt_digit, int cnt_symbol) {
int score = 0;
if (cnt_lower > 0 && cnt_upper > 0 && cnt_digit > 0 && cnt_symbol > 0)
score = 5;
else if ((cnt_lower > 0 || cnt_upper > 0) && (cnt_digit > 0) &&
(cnt_symbol > 0))
score = 3;
else if ((cnt_lower > 0 || cnt_upper > 0) && cnt_digit > 0)
score = 2;
return score;
}
void get_security_level( int score ) {
if (score >= 90) {
cout << "VERY_SECURE" << endl;
} else if (score >= 80) {
cout << "SECURE" << endl;
} else if (score >= 70) {
cout << "VERY_STRONG" << endl;
} else if (score >= 60) {
cout << "STRONG" << endl;
} else if (score >= 50) {
cout << "AVERAGE" << endl;
} else if (score >= 25) {
cout << "WEAK" << endl;
} else {
cout << "VERY_WEAK" << endl;
}
}
int main() {
string s;
while ( getline(cin, s) ) {
int lower = 0, upper = 0, digit = 0, symbol = 0;
for (char i : s) {
if (islower(i)) //小写字母
++lower;
else if (isupper(i)) //大写字母
++upper;
else if (isdigit(i)) //数字
++digit;
else
++symbol; //符号
}
int sum_score = pwd_len_score(s.size()) + letter_score( lower,
upper) + digit_score(digit) + symbol_score(symbol) + reward_score(lower, upper,
digit, symbol);
get_security_level(sum_score);
}
return 0;
}