#C4367. Parking Lot Identifier Code Validator
Parking Lot Identifier Code Validator
Parking Lot Identifier Code Validator
You are given two integers, X and Y, and a string T on a single line. The string T is an identifier code that is supposed to consist of exactly X uppercase letters followed by Y digits.
Your task is to validate whether the code T follows the required format. In other words, T must match the pattern:
\( ^[A-Z]{X}[0-9]{Y}$ \)
If T adheres to the specified format, output Valid
; otherwise, output Invalid
.
inputFormat
The input consists of a single line containing three space-separated values: an integer X, an integer Y, and a string T representing the parking lot identifier code.
outputFormat
Print a single line containing either Valid
if T meets the format requirement (exactly X uppercase letters followed by Y digits), or Invalid
otherwise.## sample
2 4 AB1234
Valid