#K58507. Valid Palindromic Password
Valid Palindromic Password
Valid Palindromic Password
You are given a password as a string. You need to verify if the password satisfies all of the following criteria:
- The length of the password is at least 6 characters.
- The password contains at least one uppercase letter and at least one digit.
- The password is a palindrome, i.e., it reads the same forward and backward. In mathematical terms, a string \(S\) is a palindrome if \(S = S^R\), where \(S^R\) represents the reverse of \(S\).
If all criteria are met, print VALID
; otherwise, print INVALID
.
inputFormat
The input consists of a single line containing the password string. Read the input from standard input (stdin).
outputFormat
Output a single line containing either 'VALID' or 'INVALID' based on whether the password meets the criteria. Write the output to standard output (stdout).## sample
A1B2B1A
VALID
</p>