password = input()
# 判断密码长度
if len(password) < 6:
print('len<6')
else:
# 定义4个变量,分别表示数字、小写字母、大写字母、特殊字符是否出现过
has_digit = False
has_lower = False
has_upper = False
has_special = False
# 遍历密码中的每个字符
for char in password:
if char.isdigit():
has_digit = True
elif char.islower():
has_lower = True
elif char.isupper():
has_upper = True
elif char in ',.!;?<>':
has_special = True
# 计算密码强度
count = has_digit + has_lower + has_upper + has_special
if count == 1:
print('weak')
elif count == 2:
print('below middle')
elif count == 3:
print('above middle')
else:
print('strong')