Your task is to figure out if the PAN number is valid or not.
A valid PAN number will have all its letters in uppercase and digits
in the same order as listed above.
First line contains . lines follow, each having a PAN number.
Each char is an uppercase letter, i.e., .
Each digit lies between 0 and 9, i.e., .
The length of the PAN number is always 10, i.e.,
Every character in PAN is either char or digit satisfying the above constraints.
For every PAN number listed, print YES if it is valid and NO if it isn't.
The first PAN number is valid since the first 5 characters are letters, the next 4 are digits and the last character is an alphabet. All letters in input is in uppercase.
The second PAN number is invalid as the fifth character is a digit as opposed to an letter.
The third PAN number contains lowercase characters. Hence invalid
You can view others' submissions if you solve this challenge. Navigate to the challenge leaderboard.