#C4407. Strong Password Checker
Strong Password Checker
Strong Password Checker
A password is considered strong if it meets all of the following criteria:
- The password has at least 8 characters.
- It contains at least one lowercase letter.
- It contains at least one uppercase letter.
- It contains at least one digit.
Your task is to write a program that reads a password from standard input and determines whether it is strong or weak. Formally, if the password satisfies all the above conditions, output strong
; otherwise, output weak
.
For clarity, a password password is defined to be strong if:
$$|password| \geq 8,$$ $$\exists c \in password \text{ such that } c \text{ is lowercase},$$ $$\exists c \in password \text{ such that } c \text{ is uppercase},$$ $$\exists c \in password \text{ such that } c \text{ is a digit}.$$inputFormat
The input consists of a single line containing the password string.
outputFormat
Output a single line: strong
if the password is strong, otherwise weak
.
aB1defgh
strong