djfz-2020-s444507/TaskC33/run.py

13 lines
217 B
Python

import re
import sys
pattern = re.compile(r"(^((?!T)[A, G, C, U])*$)|(^((?!U)[A, G, C, T])*$)")
for line in sys.stdin:
x = re.findall(pattern, line)
if x:
print('yes')
else:
print("no")