#K85532. Valid Vehicle Registration Number
Valid Vehicle Registration Number
Valid Vehicle Registration Number
You are given a string representing a vehicle registration number from the country Autonivia. A valid registration number must satisfy the following conditions:
- The registration number must be exactly 8 characters long, i.e. \( |s| = 8 \).
- The first 3 characters must be uppercase English letters (A-Z), i.e. \( s[0-2] \in [A-Z] \).
- The next 3 characters must be digits (0-9), i.e. \( s[3-5] \in [0-9] \).
- The seventh character must be a dash ('-'), i.e. \( s[6] = '-' \).
- The last character must be an uppercase English letter (A-Z), i.e. \( s[7] \in [A-Z] \).
Your task is to determine whether the input string is a valid registration number or not.
inputFormat
The input consists of a single line containing a string representing the vehicle registration number.
outputFormat
Output a single line: True
if the registration number is valid, otherwise output False
.
ABC123-D
True