#C9495. Password Validator

    ID: 53594 Type: Default 1000ms 256MiB

Password Validator

Password Validator

You are required to implement a password validator. A password is considered valid if it satisfies all of the following security rules:

  • It must contain at least one uppercase letter, i.e. $$[A-Z]$$.
  • It must contain at least one lowercase letter, i.e. $$[a-z]$$.
  • It must contain at least one digit, i.e. $$[0-9]$$.
  • It must be at least 8 characters long, i.e. $$\text{length} \ge 8$$.
  • It must not contain any spaces, i.e. $$\text{no whitespace allowed}$$.

The program will continuously read passwords from standard input until a line exactly equal to end is encountered. For each password (except the termination line), output Valid if it meets all the criteria, or Invalid otherwise.

inputFormat

The input consists of several lines. Each line contains one password. The input terminates with a line that contains the string end (without quotes).

outputFormat

For each password (except the termination line), output the validation result on a separate line. The result should be either Valid or Invalid.

## sample
P@ssw0rd
incorrect
Secure2021
Alph@numeric1
end
Valid

Invalid Valid Valid

</p>