import re

p = re.compile('^(A|B|C|D|E|F|H|K|L|M|N|O|P|R|S|T|U|V|W|X|Z) \d\d\d \w+$')
print(p.match('A 777 AAA'))
526f6a6b25c4bf2fe404590538ed2114f471a2aa
<mask token>

<mask token>
print(p.match('A 777 AAA'))

<mask token>
p = re.compile('^(A|B|C|D|E|F|H|K|L|M|N|O|P|R|S|T|U|V|W|X|Z) \\d\\d\\d \\w+$')
print(p.match('A 777 AAA'))

import re
p = re.compile('^(A|B|C|D|E|F|H|K|L|M|N|O|P|R|S|T|U|V|W|X|Z) \\d\\d\\d \\w+$')
print(p.match('A 777 AAA'))

import re

p = re.compile('^(A|B|C|D|E|F|H|K|L|M|N|O|P|R|S|T|U|V|W|X|Z) \d\d\d \w+$')
print(p.match('A 777 AAA'))