Beautiful quinary
Given a string, determine if it qualifies as a "beautiful 5-record," according to the following rules:
<Beautiful 5-record>::=<NZED>|<NZED><EDS><ODS>
<NZED>::=2|4
<EDS>::= | <EDS><ED>
<ED>::= 0|<NZED>
<ODS>::= <OD>|<ODS><OD>
<OD>::= 1|3
In simpler terms, a "beautiful 5-record" is a base-5 number that must begin with a non-zero even base-5 digit. All even digits must appear at the start of the record, followed by any odd digits. If there are no odd digits, the record must be exactly one digit long.
Input
The first line contains a record, without spaces, that needs to be checked to determine if it is a beautiful 5-record.
Output
Provide the result of the input string analysis on a single line. If the string is a beautiful 5-record, output "OK." Otherwise, output "Error in pos: K," where K is the position number, starting from 1, where it first becomes evident that the string is not a beautiful 5-record.