#B3843. Password Validator

    ID: 11500 Type: Default 1000ms 256MiB

Password Validator

Password Validator

Design a program to verify the validity of a user password during website registration. A valid password should meet the following criteria:

  • It can only consist of 26 lowercase letters ($a \sim z$), 26 uppercase letters ($A \sim Z$), 10 digits ($0 \sim 9$) and 4 special characters: !@#$.
  • The length of the password must be at least 6 characters and at most 12 characters.
  • The password must include at least two types among uppercase letters, lowercase letters, and digits, and it must contain at least one of the special characters.

inputFormat

The input consists of a single line containing the password string.

outputFormat

Output Valid if the password meets all the conditions; otherwise, output Invalid.

sample

aA1!a!
Valid