import sys sec_level_tab = ( (90, "VERY_SECURE"), (80, "SECURE"), (70, "VERY_STRONG"), (60, "STRONG"), (50, "AVERAGE"), (25, "WEAK"), (0, "VERY_WEAK"), ) def score(pwd): size = len(pwd) if size >= 8: score = 25 elif size >= 5: score = 10 else: score = 5 has_upper = has_lower = False digit_num = sign_num = 0 for c in pwd: if 'A' <= c <= 'Z': has_upper = True elif 'a' <= c <= 'z': has_lower = True elif '0' <= c <= '9': digit_num += 1 elif 0x21 <= ord(c) <= 0x2F or 0x3A <= ord(c) <= 0x40: sign_num += 1 if has_lower and has_upper: score += 20 elif has_lower or has_upper: score += 10 if digit_num > 1: score += 20 elif digit_num == 1: score += 10 if sign_num > 1: score += 25 elif sign_num == 1: score += 10 if digit_num > 0: if sign_num > 0: if has_lower and has_upper: score += 5 elif has_lower or has_upper: score += 3 elif has_lower or has_upper: score += 2 return score def level(score): for sec_level in sec_level_tab: if score >= sec_level[0]: return sec_level[1] for line in sys.stdin.readlines(): line = line.strip() print(level(score(line)))