#C5214. Taco: Strong Password Evaluation

    ID: 48839 Type: Default 1000ms 256MiB

Taco: Strong Password Evaluation

Taco: Strong Password Evaluation

Your task is to implement a password evaluation program that checks whether a given password is strong. A strong password satisfies all of the following conditions:

  • It contains at least one uppercase letter.
  • It contains at least one lowercase letter.
  • It contains at least one digit.
  • It contains at least one special character from the set: \( !@\#\$\%\^\&\*()\-\+ \).

The program should read multiple passwords from standard input and output for each password either "Strong" or "Weak" depending on whether the password meets the criteria.

inputFormat

The first line of input contains an integer \( n \) which is the number of passwords to evaluate. The following \( n \) lines each contain one password.

Example:

3
HelloWorld1!
weakpassword123
Another$Pass2

outputFormat

For each password, output a single line containing either "Strong" or "Weak", based on whether the password meets the criteria.

Example Output:

Strong
Weak
Strong
## sample
3
HelloWorld1!
weakpassword123
Another$Pass2
Strong

Weak Strong

</p>