password = input() def psw_score(psw): # 1. Length check: len_score = 0 psw_len = len(psw) if psw_len >= 8: len_score = 25 elif psw_len >= 5: len_score = 10 else: len_score = 5 # 2. Letters check: let_score = 0 upper_count = 0 lower_count = 0 for char in psw: if char.isupper(): upper_count += 1 elif char.islower(): lower_count += 1 if upper_count >= 1 and lower_count >= 1: let_score = 20 elif upper_count >= 1 and lower_count == 0: let_score = 10 elif upper_count == 0 and lower_count >= 1: let_score = 10 else: let_score = 0 # 3. Numbers check: num_score = 0 digit_count = 0 for char in psw: if char.isdigit(): digit_count += 1 if digit_count > 1: num_score = 20 elif digit_count == 1: num_score = 10 else: num_score = 0 # 4. Symbols check: sym_score = 0 sym_count = 0 spe_chars = r'!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~' for char in psw: if char in spe_chars: sym_count += 1 if sym_count > 1: sym_score = 25 elif sym_count == 1: sym_score = 10 else: sym_score = 0 # 5. Bonus: bonus = 0 if (let_score == 20) and (num_score >= 10) and (sym_score >= 10): bonus = 5 elif (let_score == 10) and (num_score >= 10) and (sym_score >= 10): bonus = 3 elif (len_score == 10) and (num_score >= 10) and (sym_score == 0): bonus = 2 else: bonus = 0 total_score = len_score + let_score + num_score + sym_score + bonus if total_score >= 90: return "VERY_SECURE" elif total_score >= 80: return "SECURE" elif total_score >= 70: return "VERY_STRONG" elif total_score >= 60: return "STRONG" elif total_score >= 50: return "AVERAGE" elif total_score >= 25: return "WEAK" else: return "VERY_WEAK" print(psw_score(password))