#K38352. Password Validation Challenge
Password Validation Challenge
Password Validation Challenge
You are given a list of passwords. For each password, you must verify that it meets the following security criteria:
- The password must be at least 8 characters long.
- The password must not contain any spaces.
- The password must contain at least one uppercase letter.
- The password must contain at least one digit.
- The password must include at least one special character from the set: \(\{!@#$%^&*()\}\).
If the password satisfies all of these conditions, output VALID
. Otherwise, output INVALID
.
inputFormat
The input begins with an integer T on the first line representing the number of test cases. Each of the following T lines contains one password string.
outputFormat
For each test case, print a single line containing either VALID
or INVALID
depending on whether the password meets the security requirements.## sample
1
SecurePa$$word123
VALID
</p>